var e, t;
function r() {
	return new Promise(e => {
		const t = new FileReader();
		(t.onload = () => e(t.result)), t.readAsArrayBuffer(this);
	});
}
'undefined' != typeof File && (null != (e = File.prototype).arrayBuffer || (e.arrayBuffer = r)), 'undefined' != typeof Blob && (null != (t = Blob.prototype).arrayBuffer || (t.arrayBuffer = r));
const n = async (e, t = {}) =>
	new Promise(r => {
		const n = document.createElement('video');
		(n.muted = !0),
			(n.playsInline = !0),
			Object.assign(n, t),
			e instanceof globalThis.MediaStream
				? ((n.srcObject = e), n.addEventListener('ended', () => (n.srcObject = null)))
				: ((n.src = 'string' == typeof e ? e : URL.createObjectURL(e)), n.addEventListener('ended', () => URL.revokeObjectURL(n.src))),
			(n.style.position = 'fixed'),
			(n.style.zIndex = '-9999999'),
			(n.style.opacity = '0.0000000001'),
			document.body.appendChild(n);
		const o = setInterval(() => n.readyState, 300);
		n.addEventListener('play', e => clearInterval(o), { once: !0 }), n.addEventListener('play', e => r(n), { once: !0 }), n.addEventListener('loadedmetadata', e => n.play(), { once: !0 });
	});
let o = 0;
const a = () => o++;
const i = new (
		'undefined' != typeof window
			? class extends Worker {
					constructor() {
						const e = URL.createObjectURL(new Blob(['onmessage = ({ data }) => {\n    const { id, timeout } = data\n    setTimeout(postMessage, timeout, { id })\n}\n']));
						super(e), URL.revokeObjectURL(e);
					}
			  }
			: class {
					constructor() {}
			  }
	)(),
	u = new Map(),
	s = (e, t) => {
		const r = a();
		return u.set(r, e), i.postMessage({ id: r, timeout: t }), r;
	};
i.onmessage = ({ data: e }) => {
	const { id: t } = e,
		r = u.get(t);
	u.delete(t), r();
};
const c = [];
let l = 0;
const f = e => {
	const t = a();
	if (0 === c.length) {
		const e = Date.now();
		s(() => {
			const e = (l = Date.now()),
				t = [...c];
			(c.length = 0), t.forEach(t => t(e));
		}, 16.666666666666668 - ((e - l) % 16.666666666666668));
	}
	return c.push(e), t;
};
var d = Object.freeze({ __proto__: null, [Symbol.toStringTag]: 'Module', setTimeout: s, requestAnimationFrame: f });
const m = new Map();
'undefined' != typeof document &&
	document.addEventListener('visibilitychange', () => {
		'visible' !== document.visibilityState &&
			m.forEach((e, t) => {
				m.delete(t), cancelAnimationFrame(t), f(e);
			});
	});
var p = Object.freeze({
	__proto__: null,
	[Symbol.toStringTag]: 'Module',
	setTimeout: (...e) => window.setTimeout(...e),
	requestAnimationFrame: e => {
		const t = window.requestAnimationFrame((...r) => {
			m.delete(t), e(...r);
		});
		return m.set(t, e), t;
	}
});
const h = () => ('visible' === document.visibilityState ? p : d),
	v = e => h().requestAnimationFrame(e),
	g = (e, t) => h().setTimeout(e, t),
	w = (e, t) => {
		let r;
		return 'undefined' == typeof OffscreenCanvas ? ((r = document.createElement('canvas')), (r.width = e), (r.height = t)) : (r = new OffscreenCanvas(e, t)), r;
	},
	y = { alpha: !1, desynchronized: !0 },
	b = (e, t) => {
		const r = w(e, t).getContext('2d', y);
		return {
			width: e,
			height: t,
			drawImage: async (e, t, n, o, a) => {
				r.save(), r.translate(t, n), r.scale(Math.sign(o), Math.sign(a)), r.drawImage(e, 0, 0, Math.abs(o), Math.abs(a)), r.restore();
			},
			getImageData: async (...e) => (await new Promise(e => g(e)), r.getImageData(...e)),
			dispose: () => {}
		};
	};
const _ = { alpha: !1, antialias: !1, depth: !1, desynchronized: !0, powerPreference: 'high-performance', premultipliedAlpha: !1, preserveDrawingBuffer: !1, stencil: !1 },
	E = (e, t) => {
		const r = w(e, t).getContext('webgl2', _);
		if (null == r) return null;
		const n = k(
				r,
				r.VERTEX_SHADER,
				'#version 300 es\n    uniform vec2 u_translate;\n    uniform vec2 u_scale;\n    out vec2 v_tex_uv;\n\n    void main() {\n      // https://rauwendaal.net/2014/06/14/rendering-a-screen-covering-triangle-in-opengl/\n      float x = -1.0 + float((gl_VertexID & 1) << 2);\n      float y = -1.0 + float((gl_VertexID & 2) << 1);\n     \n      gl_Position = vec4(x, y, 0, 1);\n\n      v_tex_uv.x = (x + 1.0) * 0.5;\n      v_tex_uv.y = (y + 1.0) * 0.5;\n\n      v_tex_uv = v_tex_uv * u_scale + u_translate;\n    }\n  '
			),
			o = k(
				r,
				r.FRAGMENT_SHADER,
				'#version 300 es\n    precision mediump float;\n\n    in vec2 v_tex_uv;\n    uniform sampler2D u_texture;\n    out vec4 fragColor;\n\n    void main () {\n      fragColor = texture(u_texture, v_tex_uv);\n    }\n  '
			),
			a = (function (e, t, r) {
				const n = e.createProgram();
				if ((e.attachShader(n, t), e.attachShader(n, r), e.linkProgram(n), !e.getProgramParameter(n, e.LINK_STATUS))) throw Error(e.getProgramInfoLog(n));
				return e.useProgram(n), n;
			})(r, n, o),
			i = r.createTexture();
		r.activeTexture(r.TEXTURE0),
			r.bindTexture(r.TEXTURE_2D, i),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.NEAREST),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.LINEAR);
		const u = r.createTexture();
		r.activeTexture(r.TEXTURE1),
			r.bindTexture(r.TEXTURE_2D, u),
			r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, e, t, 0, r.RGBA, r.UNSIGNED_BYTE, null),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.NEAREST),
			r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, r.LINEAR);
		const s = r.createFramebuffer();
		r.bindFramebuffer(r.FRAMEBUFFER, s), r.framebufferTexture2D(r.FRAMEBUFFER, r.COLOR_ATTACHMENT0, r.TEXTURE_2D, u, 0);
		const c = r.createBuffer();
		r.bindBuffer(r.PIXEL_PACK_BUFFER, c), r.bufferData(r.PIXEL_PACK_BUFFER, 0, r.STREAM_READ);
		const l = r.getUniformLocation(a, 'u_translate'),
			f = r.getUniformLocation(a, 'u_scale');
		let d;
		return {
			width: e,
			height: t,
			drawImage: async (e, t, n, o, a) => {
				r.activeTexture(r.TEXTURE0),
					r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, r.RGBA, r.UNSIGNED_BYTE, e),
					r.activeTexture(r.TEXTURE1),
					r.texImage2D(r.TEXTURE_2D, 0, r.RGBA, Math.abs(o), Math.abs(a), 0, r.RGBA, r.UNSIGNED_BYTE, null),
					r.uniform2fv(l, new Float32Array([t / Math.abs(o), n / Math.abs(a)])),
					r.uniform2fv(f, new Float32Array([Math.sign(o), Math.sign(a)])),
					r.viewport(0, 0, Math.abs(o), Math.abs(a)),
					r.drawArrays(r.TRIANGLES, 0, 3);
			},
			getImageData: async (e, t, n, o) => (
				(null == d ? void 0 : d.length) !== n * o * 4 && ((d = new Uint8ClampedArray(n * o * 4)), r.bufferData(r.PIXEL_PACK_BUFFER, d.length, r.STREAM_READ)),
				r.readPixels(e, t, n, o, r.RGBA, r.UNSIGNED_BYTE, 0),
				await (async function (e) {
					const t = e.fenceSync(e.SYNC_GPU_COMMANDS_COMPLETE, 0),
						r = () => {
							const r = e.clientWaitSync(t, 0, 0);
							return r === e.ALREADY_SIGNALED || r === e.CONDITION_SATISFIED;
						};
					e.flush();
					for (; !r(); ) await new Promise(e => g(e));
					e.deleteSync(t);
				})(r),
				r.getBufferSubData(r.PIXEL_PACK_BUFFER, 0, d),
				{ data: d, width: n, height: o }
			),
			dispose() {
				r.deleteFramebuffer(s), r.deleteBuffer(c), r.deleteTexture(u), r.deleteTexture(i), r.deleteShader(n), r.deleteShader(o), r.deleteProgram(a);
			}
		};
	};
function k(e, t, r) {
	const n = e.createShader(t);
	if ((e.shaderSource(n, r), e.compileShader(n), !e.getShaderParameter(n, e.COMPILE_STATUS))) throw new Error(e.getShaderInfoLog(n));
	return n;
}
const F = new WeakMap(),
	C = { horizontalFlip: !1, resize: (e, t) => [e, t], crop: (e, t) => [0, 0, e, t] },
	x = async (e, t = {}) => {
		var r, n;
		const { resize: o, crop: a, horizontalFlip: i } = { ...C, ...t },
			u = null != (r = e.videoWidth) ? r : e.width,
			s = null != (n = e.videoHeight) ? n : e.height;
		F.has(e) ||
			F.set(
				e,
				((e, t) => {
					let r = E(e, t);
					return null == r && (r = b(e, t)), r;
				})(u, s)
			);
		const c = F.get(e);
		if (c.width !== u || c.height !== s) return c.dispose(), F.delete(e), x(e);
		let [l, f] = [0, 0],
			[d, m] = o(u, s);
		const [p, h, v, g] = a(d, m);
		return i && ([l, d] = [d, -d]), await c.drawImage(e, l, f, d, m), await c.getImageData(p, h, v, g);
	};
class S {
	constructor(e) {
		this._src = 'string' == typeof e ? e : URL.createObjectURL(e);
	}
	async *[Symbol.asyncIterator](e) {
		const t = document.createElement('img');
		for (
			await new Promise((e, r) => {
				(t.onload = e), (t.onerror = r), (t.src = this._src);
			});
			;

		)
			yield x(t, e);
	}
}
const T = class {
	constructor(e) {
		return (this._video = null), (this._stream = e), T.cache.has(e) || T.cache.set(e, this), T.cache.get(e);
	}
	async *[Symbol.asyncIterator](e) {
		var t;
		const r = null != (t = this._video) ? t : (this._video = await n(this._stream));
		for (r.addEventListener('ended', e => r.remove(), { once: !0 }), this._stream.addEventListener('inactive', e => r.dispatchEvent(new CustomEvent('ended')), { once: !0 }); this._stream.active; )
			yield x(r, e);
	}
	stop() {
		for (const e of this._stream.getVideoTracks()) e.stop();
	}
};
let D = T;
D.cache = new WeakMap();
const P = { loop: !1 };
class M {
	constructor(e, t) {
		(this._video = null), (this._options = { ...P, ...t }), (this._src = 'string' == typeof e ? e : URL.createObjectURL(e));
	}
	async *[Symbol.asyncIterator](e) {
		var t;
		const r = null != (t = this._video) ? t : (this._video = await n(this._src, this._options));
		for (r.addEventListener('pause', e => r.remove(), { once: !0 }), r.addEventListener('ended', e => r.remove(), { once: !0 }); !r.paused && !r.ended; ) yield x(r, e);
	}
	stop() {
		var e;
		null == (e = this._video) || e.pause();
	}
}
const A = 'undefined' != typeof screen && screen.height > screen.width,
	L = { facingMode: 'user', width: A ? void 0 : { min: 640, ideal: 1280, max: 1920 }, height: A ? void 0 : { min: 480, ideal: 720, max: 1080 }, resizeMode: { ideal: 'crop-and-scale' } };
class R {
	constructor(e) {
		(this._stream = null), (this._constraints = { ...L, ...e });
	}
	async start() {
		return null != this._stream || (this._stream = await I(this._constraints)), this;
	}
	async *[Symbol.asyncIterator]({ horizontalFlip: e = !0, ...t } = {}) {
		var r;
		const n = null != (r = this._stream) ? r : (this._stream = await I(this._constraints));
		yield* n[Symbol.asyncIterator]({ horizontalFlip: e, ...t });
	}
	stop() {
		this._stream && (this._stream.stop(), (this._stream = null));
	}
}
const I = async e => {
	if (void 0 === navigator.mediaDevices)
		throw new Error(
			"SecureContext is required to access webcam\nIt's likely you need to set up HTTPS/TLS for your website\nSee https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Encryption_based_security for details "
		);
	return new D(await navigator.mediaDevices.getUserMedia({ video: e }));
};
var B,
	U,
	O,
	N,
	j,
	z = { exports: {} };
(z.exports = O = {}),
	(O.parse = function (e, t) {
		for (var r = O.bin.readUshort, n = O.bin.readUint, o = 0, a = {}, i = new Uint8Array(e), u = i.length - 4; 101010256 != n(i, u); ) u--;
		(o = u), (o += 4);
		var s = r(i, (o += 4));
		r(i, (o += 2));
		var c = n(i, (o += 2)),
			l = n(i, (o += 4));
		(o += 4), (o = l);
		for (var f = 0; f < s; f++) {
			n(i, o), (o += 4), (o += 4), (o += 4), n(i, (o += 4)), (c = n(i, (o += 4)));
			var d = n(i, (o += 4)),
				m = r(i, (o += 4)),
				p = r(i, o + 2),
				h = r(i, o + 4);
			o += 6;
			var v = n(i, (o += 8));
			(o += 4), (o += m + p + h), O._readLocal(i, v, a, c, d, t);
		}
		return a;
	}),
	(O._readLocal = function (e, t, r, n, o, a) {
		var i = O.bin.readUshort,
			u = O.bin.readUint;
		u(e, t), i(e, (t += 4)), i(e, (t += 2));
		var s = i(e, (t += 2));
		u(e, (t += 2)), u(e, (t += 4)), (t += 4);
		var c = i(e, (t += 8)),
			l = i(e, (t += 2));
		t += 2;
		var f = O.bin.readUTF8(e, t, c);
		if (((t += c), (t += l), a)) r[f] = { size: o, csize: n };
		else {
			var d = new Uint8Array(e.buffer, t);
			if (0 == s) r[f] = new Uint8Array(d.buffer.slice(t, t + n));
			else {
				if (8 != s) throw 'unknown compression method: ' + s;
				var m = new Uint8Array(o);
				O.inflateRaw(d, m), (r[f] = m);
			}
		}
	}),
	(O.inflateRaw = function (e, t) {
		return O.F.inflate(e, t);
	}),
	(O.inflate = function (e, t) {
		return e[0], e[1], O.inflateRaw(new Uint8Array(e.buffer, e.byteOffset + 2, e.length - 6), t);
	}),
	(O.deflate = function (e, t) {
		null == t && (t = { level: 6 });
		var r = 0,
			n = new Uint8Array(50 + Math.floor(1.1 * e.length));
		(n[r] = 120), (n[r + 1] = 156), (r += 2), (r = O.F.deflateRaw(e, n, r, t.level));
		var o = O.adler(e, 0, e.length);
		return (n[r + 0] = (o >>> 24) & 255), (n[r + 1] = (o >>> 16) & 255), (n[r + 2] = (o >>> 8) & 255), (n[r + 3] = (o >>> 0) & 255), new Uint8Array(n.buffer, 0, r + 4);
	}),
	(O.deflateRaw = function (e, t) {
		null == t && (t = { level: 6 });
		var r = new Uint8Array(50 + Math.floor(1.1 * e.length)),
			n = O.F.deflateRaw(e, r, n, t.level);
		return new Uint8Array(r.buffer, 0, n);
	}),
	(O.encode = function (e, t) {
		null == t && (t = !1);
		var r = 0,
			n = O.bin.writeUint,
			o = O.bin.writeUshort,
			a = {};
		for (var i in e) {
			var u = !O._noNeed(i) && !t,
				s = e[i],
				c = O.crc.crc(s, 0, s.length);
			a[i] = { cpr: u, usize: s.length, crc: c, file: u ? O.deflateRaw(s) : s };
		}
		for (var i in a) r += a[i].file.length + 30 + 46 + 2 * O.bin.sizeUTF8(i);
		r += 22;
		var l = new Uint8Array(r),
			f = 0,
			d = [];
		for (var i in a) {
			var m = a[i];
			d.push(f), (f = O._writeHeader(l, f, i, m, 0));
		}
		var p = 0,
			h = f;
		for (var i in a) (m = a[i]), d.push(f), (f = O._writeHeader(l, f, i, m, 1, d[p++]));
		var v = f - h;
		return n(l, f, 101010256), (f += 4), o(l, (f += 4), p), o(l, (f += 2), p), n(l, (f += 2), v), n(l, (f += 4), h), (f += 4), (f += 2), l.buffer;
	}),
	(O._noNeed = function (e) {
		var t = e.split('.').pop().toLowerCase();
		return -1 != 'png,jpg,jpeg,zip'.indexOf(t);
	}),
	(O._writeHeader = function (e, t, r, n, o, a) {
		var i = O.bin.writeUint,
			u = O.bin.writeUshort,
			s = n.file;
		return (
			i(e, t, 0 == o ? 67324752 : 33639248),
			(t += 4),
			1 == o && (t += 2),
			u(e, t, 20),
			u(e, (t += 2), 0),
			u(e, (t += 2), n.cpr ? 8 : 0),
			i(e, (t += 2), 0),
			i(e, (t += 4), n.crc),
			i(e, (t += 4), s.length),
			i(e, (t += 4), n.usize),
			u(e, (t += 4), O.bin.sizeUTF8(r)),
			u(e, (t += 2), 0),
			(t += 2),
			1 == o && ((t += 2), (t += 2), i(e, (t += 6), a), (t += 4)),
			(t += O.bin.writeUTF8(e, t, r)),
			0 == o && (e.set(s, t), (t += s.length)),
			t
		);
	}),
	(O.crc = {
		table: (function () {
			for (var e = new Uint32Array(256), t = 0; t < 256; t++) {
				for (var r = t, n = 0; n < 8; n++) 1 & r ? (r = 3988292384 ^ (r >>> 1)) : (r >>>= 1);
				e[t] = r;
			}
			return e;
		})(),
		update: function (e, t, r, n) {
			for (var o = 0; o < n; o++) e = O.crc.table[255 & (e ^ t[r + o])] ^ (e >>> 8);
			return e;
		},
		crc: function (e, t, r) {
			return 4294967295 ^ O.crc.update(4294967295, e, t, r);
		}
	}),
	(O.adler = function (e, t, r) {
		for (var n = 1, o = 0, a = t, i = t + r; a < i; ) {
			for (var u = Math.min(a + 5552, i); a < u; ) o += n += e[a++];
			(n %= 65521), (o %= 65521);
		}
		return (o << 16) | n;
	}),
	(O.bin = {
		readUshort: function (e, t) {
			return e[t] | (e[t + 1] << 8);
		},
		writeUshort: function (e, t, r) {
			(e[t] = 255 & r), (e[t + 1] = (r >> 8) & 255);
		},
		readUint: function (e, t) {
			return 16777216 * e[t + 3] + ((e[t + 2] << 16) | (e[t + 1] << 8) | e[t]);
		},
		writeUint: function (e, t, r) {
			(e[t] = 255 & r), (e[t + 1] = (r >> 8) & 255), (e[t + 2] = (r >> 16) & 255), (e[t + 3] = (r >> 24) & 255);
		},
		readASCII: function (e, t, r) {
			for (var n = '', o = 0; o < r; o++) n += String.fromCharCode(e[t + o]);
			return n;
		},
		writeASCII: function (e, t, r) {
			for (var n = 0; n < r.length; n++) e[t + n] = r.charCodeAt(n);
		},
		pad: function (e) {
			return e.length < 2 ? '0' + e : e;
		},
		readUTF8: function (e, t, r) {
			for (var n, o = '', a = 0; a < r; a++) o += '%' + O.bin.pad(e[t + a].toString(16));
			try {
				n = decodeURIComponent(o);
			} catch (i) {
				return O.bin.readASCII(e, t, r);
			}
			return n;
		},
		writeUTF8: function (e, t, r) {
			for (var n = r.length, o = 0, a = 0; a < n; a++) {
				var i = r.charCodeAt(a);
				if (0 == (4294967168 & i)) (e[t + o] = i), o++;
				else if (0 == (4294965248 & i)) (e[t + o] = 192 | (i >> 6)), (e[t + o + 1] = 128 | ((i >> 0) & 63)), (o += 2);
				else if (0 == (4294901760 & i)) (e[t + o] = 224 | (i >> 12)), (e[t + o + 1] = 128 | ((i >> 6) & 63)), (e[t + o + 2] = 128 | ((i >> 0) & 63)), (o += 3);
				else {
					if (0 != (4292870144 & i)) throw 'e';
					(e[t + o] = 240 | (i >> 18)), (e[t + o + 1] = 128 | ((i >> 12) & 63)), (e[t + o + 2] = 128 | ((i >> 6) & 63)), (e[t + o + 3] = 128 | ((i >> 0) & 63)), (o += 4);
				}
			}
			return o;
		},
		sizeUTF8: function (e) {
			for (var t = e.length, r = 0, n = 0; n < t; n++) {
				var o = e.charCodeAt(n);
				if (0 == (4294967168 & o)) r++;
				else if (0 == (4294965248 & o)) r += 2;
				else if (0 == (4294901760 & o)) r += 3;
				else {
					if (0 != (4292870144 & o)) throw 'e';
					r += 4;
				}
			}
			return r;
		}
	}),
	(O.F = {}),
	(O.F.deflateRaw = function (e, t, r, n) {
		var o = [
				[0, 0, 0, 0, 0],
				[4, 4, 8, 4, 0],
				[4, 5, 16, 8, 0],
				[4, 6, 16, 16, 0],
				[4, 10, 16, 32, 0],
				[8, 16, 32, 32, 0],
				[8, 16, 128, 128, 0],
				[8, 32, 128, 256, 0],
				[32, 128, 258, 1024, 1],
				[32, 258, 258, 4096, 1]
			][n],
			a = O.F.U,
			i = O.F._goodIndex;
		O.F._hash;
		var u = O.F._putsE,
			s = 0,
			c = r << 3,
			l = 0,
			f = e.length;
		if (0 == n) {
			for (; s < f; ) u(t, c, s + (k = Math.min(65535, f - s)) == f ? 1 : 0), (c = O.F._copyExact(e, s, k, t, c + 8)), (s += k);
			return c >>> 3;
		}
		var d = a.lits,
			m = a.strt,
			p = a.prev,
			h = 0,
			v = 0,
			g = 0,
			w = 0,
			y = 0,
			b = 0;
		for (f > 2 && (m[(b = O.F._hash(e, 0))] = 0), s = 0; s < f; s++) {
			if (((y = b), s + 1 < f - 2)) {
				b = O.F._hash(e, s + 1);
				var _ = (s + 1) & 32767;
				(p[_] = m[b]), (m[b] = _);
			}
			if (l <= s) {
				(h > 14e3 || v > 26697) &&
					f - s > 100 &&
					(l < s && ((d[h] = s - l), (h += 2), (l = s)), (c = O.F._writeBlock(s == f - 1 || l == f ? 1 : 0, d, h, w, e, g, s - g, t, c)), (h = v = w = 0), (g = s));
				var E = 0;
				s < f - 2 && (E = O.F._bestMatch(e, s, p, y, Math.min(o[2], f - s), o[3]));
				var k = E >>> 16,
					F = 65535 & E;
				if (0 != E) {
					F = 65535 & E;
					var C = i((k = E >>> 16), a.of0);
					a.lhst[257 + C]++;
					var x = i(F, a.df0);
					a.dhst[x]++, (w += a.exb[C] + a.dxb[x]), (d[h] = (k << 23) | (s - l)), (d[h + 1] = (F << 16) | (C << 8) | x), (h += 2), (l = s + k);
				} else a.lhst[e[s]]++;
				v++;
			}
		}
		for (
			(g == s && 0 != e.length) || (l < s && ((d[h] = s - l), (h += 2), (l = s)), (c = O.F._writeBlock(1, d, h, w, e, g, s - g, t, c)), (h = 0), (v = 0), (h = v = w = 0), (g = s));
			0 != (7 & c);

		)
			c++;
		return c >>> 3;
	}),
	(O.F._bestMatch = function (e, t, r, n, o, a) {
		var i = 32767 & t,
			u = r[i],
			s = (i - u + 32768) & 32767;
		if (u == i || n != O.F._hash(e, t - s)) return 0;
		for (var c = 0, l = 0, f = Math.min(32767, t); s <= f && 0 != --a && u != i; ) {
			if (0 == c || e[t + c] == e[t + c - s]) {
				var d = O.F._howLong(e, t, s);
				if (d > c) {
					if (((l = s), (c = d) >= o)) break;
					s + 2 < d && (d = s + 2);
					for (var m = 0, p = 0; p < d - 2; p++) {
						var h = (t - s + p + 32768) & 32767,
							v = (h - r[h] + 32768) & 32767;
						v > m && ((m = v), (u = h));
					}
				}
			}
			s += ((i = u) - (u = r[i]) + 32768) & 32767;
		}
		return (c << 16) | l;
	}),
	(O.F._howLong = function (e, t, r) {
		if (e[t] != e[t - r] || e[t + 1] != e[t + 1 - r] || e[t + 2] != e[t + 2 - r]) return 0;
		var n = t,
			o = Math.min(e.length, t + 258);
		for (t += 3; t < o && e[t] == e[t - r]; ) t++;
		return t - n;
	}),
	(O.F._hash = function (e, t) {
		return (((e[t] << 8) | e[t + 1]) + (e[t + 2] << 4)) & 65535;
	}),
	(O.saved = 0),
	(O.F._writeBlock = function (e, t, r, n, o, a, i, u, s) {
		var c,
			l,
			f,
			d,
			m,
			p,
			h,
			v,
			g,
			w = O.F.U,
			y = O.F._putsF,
			b = O.F._putsE;
		w.lhst[256]++, (l = (c = O.F.getTrees())[0]), (f = c[1]), (d = c[2]), (m = c[3]), (p = c[4]), (h = c[5]), (v = c[6]), (g = c[7]);
		var _ = 32 + (0 == ((s + 3) & 7) ? 0 : 8 - ((s + 3) & 7)) + (i << 3),
			E = n + O.F.contSize(w.fltree, w.lhst) + O.F.contSize(w.fdtree, w.dhst),
			k = n + O.F.contSize(w.ltree, w.lhst) + O.F.contSize(w.dtree, w.dhst);
		k += 14 + 3 * h + O.F.contSize(w.itree, w.ihst) + (2 * w.ihst[16] + 3 * w.ihst[17] + 7 * w.ihst[18]);
		for (var F = 0; F < 286; F++) w.lhst[F] = 0;
		for (F = 0; F < 30; F++) w.dhst[F] = 0;
		for (F = 0; F < 19; F++) w.ihst[F] = 0;
		var C = _ < E && _ < k ? 0 : E < k ? 1 : 2;
		if ((y(u, s, e), y(u, s + 1, C), (s += 3), 0 == C)) {
			for (; 0 != (7 & s); ) s++;
			s = O.F._copyExact(o, a, i, u, s);
		} else {
			var x, S;
			if ((1 == C && ((x = w.fltree), (S = w.fdtree)), 2 == C)) {
				O.F.makeCodes(w.ltree, l),
					O.F.revCodes(w.ltree, l),
					O.F.makeCodes(w.dtree, f),
					O.F.revCodes(w.dtree, f),
					O.F.makeCodes(w.itree, d),
					O.F.revCodes(w.itree, d),
					(x = w.ltree),
					(S = w.dtree),
					b(u, s, m - 257),
					b(u, (s += 5), p - 1),
					b(u, (s += 5), h - 4),
					(s += 4);
				for (var T = 0; T < h; T++) b(u, s + 3 * T, w.itree[1 + (w.ordr[T] << 1)]);
				(s += 3 * h), (s = O.F._codeTiny(v, w.itree, u, s)), (s = O.F._codeTiny(g, w.itree, u, s));
			}
			for (var D = a, P = 0; P < r; P += 2) {
				for (var M = t[P], A = M >>> 23, L = D + (8388607 & M); D < L; ) s = O.F._writeLit(o[D++], x, u, s);
				if (0 != A) {
					var R = t[P + 1],
						I = R >> 16,
						B = (R >> 8) & 255,
						U = 255 & R;
					b(u, (s = O.F._writeLit(257 + B, x, u, s)), A - w.of0[B]), (s += w.exb[B]), y(u, (s = O.F._writeLit(U, S, u, s)), I - w.df0[U]), (s += w.dxb[U]), (D += A);
				}
			}
			s = O.F._writeLit(256, x, u, s);
		}
		return s;
	}),
	(O.F._copyExact = function (e, t, r, n, o) {
		var a = o >>> 3;
		return (n[a] = r), (n[a + 1] = r >>> 8), (n[a + 2] = 255 - n[a]), (n[a + 3] = 255 - n[a + 1]), (a += 4), n.set(new Uint8Array(e.buffer, t, r), a), o + ((r + 4) << 3);
	}),
	(O.F.getTrees = function () {
		for (
			var e = O.F.U, t = O.F._hufTree(e.lhst, e.ltree, 15), r = O.F._hufTree(e.dhst, e.dtree, 15), n = [], o = O.F._lenCodes(e.ltree, n), a = [], i = O.F._lenCodes(e.dtree, a), u = 0;
			u < n.length;
			u += 2
		)
			e.ihst[n[u]]++;
		for (u = 0; u < a.length; u += 2) e.ihst[a[u]]++;
		for (var s = O.F._hufTree(e.ihst, e.itree, 7), c = 19; c > 4 && 0 == e.itree[1 + (e.ordr[c - 1] << 1)]; ) c--;
		return [t, r, s, o, i, c, n, a];
	}),
	(O.F.getSecond = function (e) {
		for (var t = [], r = 0; r < e.length; r += 2) t.push(e[r + 1]);
		return t;
	}),
	(O.F.nonZero = function (e) {
		for (var t = '', r = 0; r < e.length; r += 2) 0 != e[r + 1] && (t += (r >> 1) + ',');
		return t;
	}),
	(O.F.contSize = function (e, t) {
		for (var r = 0, n = 0; n < t.length; n++) r += t[n] * e[1 + (n << 1)];
		return r;
	}),
	(O.F._codeTiny = function (e, t, r, n) {
		for (var o = 0; o < e.length; o += 2) {
			var a = e[o],
				i = e[o + 1];
			n = O.F._writeLit(a, t, r, n);
			var u = 16 == a ? 2 : 17 == a ? 3 : 7;
			a > 15 && (O.F._putsE(r, n, i, u), (n += u));
		}
		return n;
	}),
	(O.F._lenCodes = function (e, t) {
		for (var r = e.length; 2 != r && 0 == e[r - 1]; ) r -= 2;
		for (var n = 0; n < r; n += 2) {
			var o = e[n + 1],
				a = n + 3 < r ? e[n + 3] : -1,
				i = n + 5 < r ? e[n + 5] : -1,
				u = 0 == n ? -1 : e[n - 1];
			if (0 == o && a == o && i == o) {
				for (var s = n + 5; s + 2 < r && e[s + 2] == o; ) s += 2;
				(c = Math.min((s + 1 - n) >>> 1, 138)) < 11 ? t.push(17, c - 3) : t.push(18, c - 11), (n += 2 * c - 2);
			} else if (o == u && a == o && i == o) {
				for (s = n + 5; s + 2 < r && e[s + 2] == o; ) s += 2;
				var c = Math.min((s + 1 - n) >>> 1, 6);
				t.push(16, c - 3), (n += 2 * c - 2);
			} else t.push(o, 0);
		}
		return r >>> 1;
	}),
	(O.F._hufTree = function (e, t, r) {
		var n = [],
			o = e.length,
			a = t.length,
			i = 0;
		for (i = 0; i < a; i += 2) (t[i] = 0), (t[i + 1] = 0);
		for (i = 0; i < o; i++) 0 != e[i] && n.push({ lit: i, f: e[i] });
		var u = n.length,
			s = n.slice(0);
		if (0 == u) return 0;
		if (1 == u) {
			var c = n[0].lit;
			return (s = 0 == c ? 1 : 0), (t[1 + (c << 1)] = 1), (t[1 + (s << 1)] = 1), 1;
		}
		n.sort(function (e, t) {
			return e.f - t.f;
		});
		var l = n[0],
			f = n[1],
			d = 0,
			m = 1,
			p = 2;
		for (n[0] = { lit: -1, f: l.f + f.f, l: l, r: f, d: 0 }; m != u - 1; )
			(l = d != m && (p == u || n[d].f < n[p].f) ? n[d++] : n[p++]), (f = d != m && (p == u || n[d].f < n[p].f) ? n[d++] : n[p++]), (n[m++] = { lit: -1, f: l.f + f.f, l: l, r: f });
		var h = O.F.setDepth(n[m - 1], 0);
		for (h > r && (O.F.restrictDepth(s, r, h), (h = r)), i = 0; i < u; i++) t[1 + (s[i].lit << 1)] = s[i].d;
		return h;
	}),
	(O.F.setDepth = function (e, t) {
		return -1 != e.lit ? ((e.d = t), t) : Math.max(O.F.setDepth(e.l, t + 1), O.F.setDepth(e.r, t + 1));
	}),
	(O.F.restrictDepth = function (e, t, r) {
		var n = 0,
			o = 1 << (r - t),
			a = 0;
		for (
			e.sort(function (e, t) {
				return t.d == e.d ? e.f - t.f : t.d - e.d;
			}),
				n = 0;
			n < e.length && e[n].d > t;
			n++
		) {
			var i = e[n].d;
			(e[n].d = t), (a += o - (1 << (r - i)));
		}
		for (a >>>= r - t; a > 0; ) (i = e[n].d) < t ? (e[n].d++, (a -= 1 << (t - i - 1))) : n++;
		for (; n >= 0; n--) e[n].d == t && a < 0 && (e[n].d--, a++);
		0 != a && console.log('debt left');
	}),
	(O.F._goodIndex = function (e, t) {
		var r = 0;
		return t[16 | r] <= e && (r |= 16), t[8 | r] <= e && (r |= 8), t[4 | r] <= e && (r |= 4), t[2 | r] <= e && (r |= 2), t[1 | r] <= e && (r |= 1), r;
	}),
	(O.F._writeLit = function (e, t, r, n) {
		return O.F._putsF(r, n, t[e << 1]), n + t[1 + (e << 1)];
	}),
	(O.F.inflate = function (e, t) {
		var r = Uint8Array;
		if (3 == e[0] && 0 == e[1]) return t || new r(0);
		var n = O.F,
			o = n._bitsF,
			a = n._bitsE,
			i = n._decodeTiny,
			u = n.makeCodes,
			s = n.codes2map,
			c = n._get17,
			l = n.U,
			f = null == t;
		f && (t = new r((e.length >>> 2) << 3));
		for (var d, m, p = 0, h = 0, v = 0, g = 0, w = 0, y = 0, b = 0, _ = 0, E = 0; 0 == p; )
			if (((p = o(e, E, 1)), (h = o(e, E + 1, 2)), (E += 3), 0 != h)) {
				if ((f && (t = O.F._check(t, _ + (1 << 17))), 1 == h && ((d = l.flmap), (m = l.fdmap), (y = 511), (b = 31)), 2 == h)) {
					(v = a(e, E, 5) + 257), (g = a(e, E + 5, 5) + 1), (w = a(e, E + 10, 4) + 4), (E += 14);
					for (var k = 0; k < 38; k += 2) (l.itree[k] = 0), (l.itree[k + 1] = 0);
					var F = 1;
					for (k = 0; k < w; k++) {
						var C = a(e, E + 3 * k, 3);
						(l.itree[1 + (l.ordr[k] << 1)] = C), C > F && (F = C);
					}
					(E += 3 * w), u(l.itree, F), s(l.itree, F, l.imap), (d = l.lmap), (m = l.dmap), (E = i(l.imap, (1 << F) - 1, v + g, e, E, l.ttree));
					var x = n._copyOut(l.ttree, 0, v, l.ltree);
					y = (1 << x) - 1;
					var S = n._copyOut(l.ttree, v, g, l.dtree);
					(b = (1 << S) - 1), u(l.ltree, x), s(l.ltree, x, d), u(l.dtree, S), s(l.dtree, S, m);
				}
				for (;;) {
					var T = d[c(e, E) & y];
					E += 15 & T;
					var D = T >>> 4;
					if (D >>> 8 == 0) t[_++] = D;
					else {
						if (256 == D) break;
						var P = _ + D - 254;
						if (D > 264) {
							var M = l.ldef[D - 257];
							(P = _ + (M >>> 3) + a(e, E, 7 & M)), (E += 7 & M);
						}
						var A = m[c(e, E) & b];
						E += 15 & A;
						var L = A >>> 4,
							R = l.ddef[L],
							I = (R >>> 4) + o(e, E, 15 & R);
						for (E += 15 & R, f && (t = O.F._check(t, _ + (1 << 17))); _ < P; ) (t[_] = t[_++ - I]), (t[_] = t[_++ - I]), (t[_] = t[_++ - I]), (t[_] = t[_++ - I]);
						_ = P;
					}
				}
			} else {
				0 != (7 & E) && (E += 8 - (7 & E));
				var B = 4 + (E >>> 3),
					U = e[B - 4] | (e[B - 3] << 8);
				f && (t = O.F._check(t, _ + U)), t.set(new r(e.buffer, e.byteOffset + B, U), _), (E = (B + U) << 3), (_ += U);
			}
		return t.length == _ ? t : t.slice(0, _);
	}),
	(O.F._check = function (e, t) {
		var r = e.length;
		if (t <= r) return e;
		var n = new Uint8Array(Math.max(r << 1, t));
		return n.set(e, 0), n;
	}),
	(O.F._decodeTiny = function (e, t, r, n, o, a) {
		for (var i = O.F._bitsE, u = O.F._get17, s = 0; s < r; ) {
			var c = e[u(n, o) & t];
			o += 15 & c;
			var l = c >>> 4;
			if (l <= 15) (a[s] = l), s++;
			else {
				var f = 0,
					d = 0;
				16 == l ? ((d = 3 + i(n, o, 2)), (o += 2), (f = a[s - 1])) : 17 == l ? ((d = 3 + i(n, o, 3)), (o += 3)) : 18 == l && ((d = 11 + i(n, o, 7)), (o += 7));
				for (var m = s + d; s < m; ) (a[s] = f), s++;
			}
		}
		return o;
	}),
	(O.F._copyOut = function (e, t, r, n) {
		for (var o = 0, a = 0, i = n.length >>> 1; a < r; ) {
			var u = e[a + t];
			(n[a << 1] = 0), (n[1 + (a << 1)] = u), u > o && (o = u), a++;
		}
		for (; a < i; ) (n[a << 1] = 0), (n[1 + (a << 1)] = 0), a++;
		return o;
	}),
	(O.F.makeCodes = function (e, t) {
		for (var r, n, o, a, i = O.F.U, u = e.length, s = i.bl_count, c = 0; c <= t; c++) s[c] = 0;
		for (c = 1; c < u; c += 2) s[e[c]]++;
		var l = i.next_code;
		for (r = 0, s[0] = 0, n = 1; n <= t; n++) (r = (r + s[n - 1]) << 1), (l[n] = r);
		for (o = 0; o < u; o += 2) 0 != (a = e[o + 1]) && ((e[o] = l[a]), l[a]++);
	}),
	(O.F.codes2map = function (e, t, r) {
		for (var n = e.length, o = O.F.U.rev15, a = 0; a < n; a += 2)
			if (0 != e[a + 1]) for (var i = a >> 1, u = e[a + 1], s = (i << 4) | u, c = t - u, l = e[a] << c, f = l + (1 << c); l != f; ) (r[o[l] >>> (15 - t)] = s), l++;
	}),
	(O.F.revCodes = function (e, t) {
		for (var r = O.F.U.rev15, n = 15 - t, o = 0; o < e.length; o += 2) {
			var a = e[o] << (t - e[o + 1]);
			e[o] = r[a] >>> n;
		}
	}),
	(O.F._putsE = function (e, t, r) {
		r <<= 7 & t;
		var n = t >>> 3;
		(e[n] |= r), (e[n + 1] |= r >>> 8);
	}),
	(O.F._putsF = function (e, t, r) {
		r <<= 7 & t;
		var n = t >>> 3;
		(e[n] |= r), (e[n + 1] |= r >>> 8), (e[n + 2] |= r >>> 16);
	}),
	(O.F._bitsE = function (e, t, r) {
		return ((e[t >>> 3] | (e[1 + (t >>> 3)] << 8)) >>> (7 & t)) & ((1 << r) - 1);
	}),
	(O.F._bitsF = function (e, t, r) {
		return ((e[t >>> 3] | (e[1 + (t >>> 3)] << 8) | (e[2 + (t >>> 3)] << 16)) >>> (7 & t)) & ((1 << r) - 1);
	}),
	(O.F._get17 = function (e, t) {
		return (e[t >>> 3] | (e[1 + (t >>> 3)] << 8) | (e[2 + (t >>> 3)] << 16)) >>> (7 & t);
	}),
	(O.F._get25 = function (e, t) {
		return (e[t >>> 3] | (e[1 + (t >>> 3)] << 8) | (e[2 + (t >>> 3)] << 16) | (e[3 + (t >>> 3)] << 24)) >>> (7 & t);
	}),
	(O.F.U =
		((B = Uint16Array),
		(U = Uint32Array),
		{
			next_code: new B(16),
			bl_count: new B(16),
			ordr: [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
			of0: [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 999, 999, 999],
			exb: [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0],
			ldef: new B(32),
			df0: [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 65535, 65535],
			dxb: [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0],
			ddef: new U(32),
			flmap: new B(512),
			fltree: [],
			fdmap: new B(32),
			fdtree: [],
			lmap: new B(32768),
			ltree: [],
			ttree: [],
			dmap: new B(32768),
			dtree: [],
			imap: new B(512),
			itree: [],
			rev15: new B(32768),
			lhst: new U(286),
			dhst: new U(30),
			ihst: new U(19),
			lits: new U(15e3),
			strt: new B(65536),
			prev: new B(32768)
		})),
	(function () {
		for (var e = O.F.U, t = 0; t < 32768; t++) {
			var r = t;
			(r =
				((4278255360 & (r = ((4042322160 & (r = ((3435973836 & (r = ((2863311530 & r) >>> 1) | ((1431655765 & r) << 1))) >>> 2) | ((858993459 & r) << 2))) >>> 4) | ((252645135 & r) << 4))) >>>
					8) |
				((16711935 & r) << 8)),
				(e.rev15[t] = ((r >>> 16) | (r << 16)) >>> 17);
		}
		function n(e, t, r) {
			for (; 0 != t--; ) e.push(0, r);
		}
		for (t = 0; t < 32; t++) (e.ldef[t] = (e.of0[t] << 3) | e.exb[t]), (e.ddef[t] = (e.df0[t] << 4) | e.dxb[t]);
		n(e.fltree, 144, 8),
			n(e.fltree, 112, 9),
			n(e.fltree, 24, 7),
			n(e.fltree, 8, 8),
			O.F.makeCodes(e.fltree, 9),
			O.F.codes2map(e.fltree, 9, e.flmap),
			O.F.revCodes(e.fltree, 9),
			n(e.fdtree, 32, 5),
			O.F.makeCodes(e.fdtree, 5),
			O.F.codes2map(e.fdtree, 5, e.fdmap),
			O.F.revCodes(e.fdtree, 5),
			n(e.itree, 19, 0),
			n(e.ltree, 286, 0),
			n(e.dtree, 30, 0),
			n(e.ttree, 320, 0);
	})();
((j = N || (N = {})).write = (e, t, r) => {
	const n = t.split('/');
	'' === n[0] && n.shift(), n.length > 1 && n.reduce((t, r) => (j.exists(e, t) || e.mkdir(t), `${t}/${r}`)), e.writeFile(t, r);
}),
	(j.exists = (e, t) => {
		try {
			return e.lstat(t), !0;
		} catch (r) {
			if (44 === r.errno || 'ENOENT' === r.code) return !1;
			throw r;
		}
	});
class W extends class {
	static async preload(e) {
		if (Array.isArray(e)) return await Promise.all(e.map(e => this.preload(e)));
		const t = new this(e);
		return await t._load(), t;
	}
	constructor(e) {
		this._source = e;
	}
	async _load() {
		if (this._data) return this._data;
		let e = this._source;
		if (
			('string' == typeof e &&
				(e = await fetch(e)
					.then(t => {
						if (t.ok) return t.blob();
						throw new Error(`${t.status}: Failed to fetch ${e}`);
					})
					.then(e => {
						if (e.size > 0) return e;
						throw new Error(`The source must not be empty. Received ${e.size} bytes size source.`);
					})),
			e instanceof Blob)
		) {
			if (!e.type.includes('zip')) throw new TypeError(`The source type must be "application/zip"-like. Received: "${e.type}".`);
			this._data = await e
				.arrayBuffer()
				.then(z.exports.parse)
				.then(e => Object.entries(e))
				.then(e => e.filter(([e]) => !e.startsWith('__MACOSX/')))
				.then(e => e.filter(([e, t]) => t.length))
				.then(Object.fromEntries);
		}
		return this._data;
	}
	async _write(e) {
		const t = await this._load();
		Object.entries(t).forEach(([t, r]) => N.write(e, t, r));
	}
} {
	constructor(e) {
		super(e);
	}
	static async preload(e) {
		return super.preload(e);
	}
	async _write(e) {
		const t = await super._load(),
			[r] = Object.keys(t)[0].split('/');
		return await super._write(e), r;
	}
}
/*! (c) Andrea Giammarchi - ISC */ var G = {};
try {
	G.EventTarget = new EventTarget().constructor;
} catch (le) {
	!(function (e, t) {
		var r = e.create,
			n = e.defineProperty,
			o = a.prototype;
		function a() {
			t.set(this, r(null));
		}
		function i(e, t, r) {
			n(e, t, { configurable: !0, writable: !0, value: r });
		}
		function u(e) {
			var t = e.options;
			return (
				t && t.once && e.target.removeEventListener(this.type, e.listener),
				'function' == typeof e.listener ? e.listener.call(e.target, this) : e.listener.handleEvent(this),
				this._stopImmediatePropagationFlag
			);
		}
		i(o, 'addEventListener', function (e, r, n) {
			for (var o = t.get(this), a = o[e] || (o[e] = []), i = 0, u = a.length; i < u; i++) if (a[i].listener === r) return;
			a.push({ target: this, listener: r, options: n });
		}),
			i(o, 'dispatchEvent', function (e) {
				var r = t.get(this)[e.type];
				return r && (i(e, 'target', this), i(e, 'currentTarget', this), r.slice(0).some(u, e), delete e.currentTarget, delete e.target), !0;
			}),
			i(o, 'removeEventListener', function (e, r) {
				for (var n = t.get(this), o = n[e] || (n[e] = []), a = 0, i = o.length; a < i; a++) if (o[a].listener === r) return void o.splice(a, 1);
			}),
			(G.EventTarget = a);
	})(Object, new WeakMap());
}
var $ = G.EventTarget;
var q,
	X =
		((q = 'undefined' != typeof document && document.currentScript ? document.currentScript.src : void 0),
		function (e) {
			var t, r;
			((e = void 0 !== (e = e || {}) ? e : {}).ready = new Promise(function (e, n) {
				(t = e), (r = n);
			})),
				e.expectedDataFileDownloads || (e.expectedDataFileDownloads = 0),
				e.expectedDataFileDownloads++,
				(function (t) {
					if ('object' == typeof window) window.encodeURIComponent(window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf('/')) + '/');
					else {
						if ('undefined' == typeof location) throw 'using preloaded data can only be done on a web page or in a web worker';
						encodeURIComponent(location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf('/')) + '/');
					}
					var r = 'BanubaSDK.data';
					'function' != typeof e.locateFilePackage ||
						e.locateFile ||
						((e.locateFile = e.locateFilePackage), f('warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)'));
					var n = e.locateFile ? e.locateFile(r, '') : r,
						o = t.remote_package_size;
					t.package_uuid;
					var a,
						i,
						u,
						s,
						c = null,
						l = e.getPreloadedPackage ? e.getPreloadedPackage(n, o) : null;
					function d() {
						function r(e, t) {
							if (!e) throw t + new Error().stack;
						}
						function n(e, t, r) {
							(this.start = e), (this.end = t), (this.audio = r);
						}
						e.FS_createPath('/', 'frx', !0, !0),
							e.FS_createPath('/', 'bnb_js', !0, !0),
							e.FS_createPath('/', 'MoMoFRX', !0, !0),
							e.FS_createPath('/', 'flow', !0, !0),
							(n.prototype = {
								requests: {},
								open: function (t, r) {
									(this.name = r), (this.requests[r] = this), e.addRunDependency('fp ' + this.name);
								},
								send: function () {},
								onload: function () {
									var e = this.byteArray.subarray(this.start, this.end);
									this.finish(e);
								},
								finish: function (t) {
									e.FS_createDataFile(this.name, null, t, !0, !0, !0), e.removeRunDependency('fp ' + this.name), (this.requests[this.name] = null);
								}
							});
						for (var o = t.files, a = 0; a < o.length; ++a) new n(o[a].start, o[a].end, o[a].audio).open('GET', o[a].filename);
						function i(o) {
							r(o, 'Loading data file failed.'), r(o instanceof ArrayBuffer, 'bad input to processPackageData');
							var a = new Uint8Array(o);
							n.prototype.byteArray = a;
							for (var i = t.files, u = 0; u < i.length; ++u) n.prototype.requests[i[u].filename].onload();
							e.removeRunDependency('datafile_BanubaSDK.data');
						}
						e.addRunDependency('datafile_BanubaSDK.data'),
							e.preloadResults || (e.preloadResults = {}),
							(e.preloadResults['BanubaSDK.data'] = { fromCache: !1 }),
							l ? (i(l), (l = null)) : (c = i);
					}
					l ||
						((a = n),
						(i = o),
						(u = function (e) {
							c ? (c(e), (c = null)) : (l = e);
						}),
						(s = new XMLHttpRequest()).open('GET', a, !0),
						(s.responseType = 'arraybuffer'),
						(s.onprogress = function (t) {
							var r = a,
								n = i;
							if ((t.total && (n = t.total), t.loaded)) {
								s.addedTotal
									? (e.dataFileDownloads[r].loaded = t.loaded)
									: ((s.addedTotal = !0), e.dataFileDownloads || (e.dataFileDownloads = {}), (e.dataFileDownloads[r] = { loaded: t.loaded, total: n }));
								var o = 0,
									u = 0,
									c = 0;
								for (var l in e.dataFileDownloads) {
									var f = e.dataFileDownloads[l];
									(o += f.total), (u += f.loaded), c++;
								}
								(o = Math.ceil((o * e.expectedDataFileDownloads) / c)), e.setStatus && e.setStatus('Downloading data... (' + u + '/' + o + ')');
							} else e.dataFileDownloads || (e.setStatus && e.setStatus('Downloading data...'));
						}),
						(s.onerror = function (e) {
							throw new Error('NetworkError for: ' + a);
						}),
						(s.onload = function (e) {
							if (!(200 == s.status || 304 == s.status || 206 == s.status || (0 == s.status && s.response))) throw new Error(s.statusText + ' : ' + s.responseURL);
							var t = s.response;
							u(t);
						}),
						s.send(null)),
						e.calledRun ? d() : (e.preRun || (e.preRun = []), e.preRun.push(d));
				})({
					files: [
						{ filename: '/frx/frx.js', start: 0, end: 2484, audio: 0 },
						{ filename: '/bnb_js/.empty', start: 2484, end: 2503, audio: 0 },
						{ filename: '/MoMoFRX/edgetopology1.ef', start: 2503, end: 49743, audio: 0 },
						{ filename: '/MoMoFRX/edgetopology1.ev', start: 49743, end: 96983, audio: 0 },
						{ filename: '/MoMoFRX/head.3308.DA.c30.tm.pca2.86.blendshapes', start: 96983, end: 1287863, audio: 0 },
						{ filename: '/MoMoFRX/head.3308.DA.c30.tm.pca2.86.means', start: 1287863, end: 1327559, audio: 0 },
						{ filename: '/MoMoFRX/head.verts', start: 1327559, end: 1367255, audio: 0 },
						{ filename: '/MoMoFRX/head1.triangles', start: 1367255, end: 1444487, audio: 0 },
						{ filename: '/MoMoFRX/head_au.tex', start: 1444487, end: 1470951, audio: 0 },
						{ filename: '/flow/frx_prior.tflite', start: 1470951, end: 2239183, audio: 0 },
						{ filename: '/flow/landmarks_96.tflite', start: 2239183, end: 4123827, audio: 0 },
						{ filename: '/flow/landmarks_128.tflite', start: 4123827, end: 6008471, audio: 0 },
						{ filename: '/flow/ssd_uint8.tflite', start: 6008471, end: 6243487, audio: 0 },
						{ filename: '/flow/bg_lite_horiz.tflite', start: 6243487, end: 6578991, audio: 0 },
						{ filename: '/flow/bg_lite_vert.tflite', start: 6578991, end: 6914495, audio: 0 },
						{ filename: '/flow/hair_lite_vert.tflite', start: 6914495, end: 7747395, audio: 0 },
						{ filename: '/flow/hair_lite_horiz.tflite', start: 7747395, end: 8580607, audio: 0 },
						{ filename: '/flow/eyes_segmentation.tflite', start: 8580607, end: 8848299, audio: 0 },
						{ filename: '/flow/lips_segmentation.tflite', start: 8848299, end: 13380615, audio: 0 },
						{ filename: '/watermark.png', start: 13380615, end: 13386536, audio: 0 },
						{ filename: '/watermark_blurred.png', start: 13386536, end: 13480158, audio: 0 }
					],
					remote_package_size: 13480158,
					package_uuid: '5511630a-7d41-4366-9571-5f1684c63461'
				});
			var n,
				o = {};
			for (n in e) e.hasOwnProperty(n) && (o[n] = e[n]);
			var a,
				i,
				u = './this.program',
				s = function (e, t) {
					throw t;
				},
				c = '';
			'undefined' != typeof document && document.currentScript && (c = document.currentScript.src),
				q && (c = q),
				(c = 0 !== c.indexOf('blob:') ? c.substr(0, c.lastIndexOf('/') + 1) : ''),
				(a = function (e) {
					var t = new XMLHttpRequest();
					return t.open('GET', e, !1), t.send(null), t.responseText;
				}),
				(i = function (e, t, r) {
					var n = new XMLHttpRequest();
					n.open('GET', e, !0),
						(n.responseType = 'arraybuffer'),
						(n.onload = function () {
							200 == n.status || (0 == n.status && n.response) ? t(n.response) : r();
						}),
						(n.onerror = r),
						n.send(null);
				});
			var l = e.print || console.log.bind(console),
				f = e.printErr || console.warn.bind(console);
			for (n in o) o.hasOwnProperty(n) && (e[n] = o[n]);
			function d(e) {
				d.shown || (d.shown = {}), d.shown[e] || ((d.shown[e] = 1), f(e));
			}
			(o = null), e.arguments, e.thisProgram && (u = e.thisProgram), e.quit && (s = e.quit);
			var m,
				p = [];
			function h(e, t) {
				if (!m) {
					m = new WeakMap();
					for (var r = 0; r < j.length; r++) {
						var n = j.get(r);
						n && m.set(n, r);
					}
				}
				if (m.has(e)) return m.get(e);
				var o = (function () {
					if (p.length) return p.pop();
					try {
						j.grow(1);
					} catch (e) {
						if (!(e instanceof RangeError)) throw e;
						throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.';
					}
					return j.length - 1;
				})();
				try {
					j.set(o, e);
				} catch (i) {
					if (!(i instanceof TypeError)) throw i;
					var a = (function (e, t) {
						if ('function' == typeof WebAssembly.Function) {
							for (var r = { i: 'i32', j: 'i64', f: 'f32', d: 'f64' }, n = { parameters: [], results: 'v' == t[0] ? [] : [r[t[0]]] }, o = 1; o < t.length; ++o)
								n.parameters.push(r[t[o]]);
							return new WebAssembly.Function(n, e);
						}
						var a = [1, 0, 1, 96],
							i = t.slice(0, 1),
							u = t.slice(1),
							s = { i: 127, j: 126, f: 125, d: 124 };
						for (a.push(u.length), o = 0; o < u.length; ++o) a.push(s[u[o]]);
						'v' == i ? a.push(0) : (a = a.concat([1, s[i]])), (a[1] = a.length - 2);
						var c = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0].concat(a, [2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0])),
							l = new WebAssembly.Module(c);
						return new WebAssembly.Instance(l, { e: { f: e } }).exports.f;
					})(e, t);
					j.set(o, a);
				}
				return m.set(e, o), o;
			}
			var v,
				g = 0;
			e.wasmBinary && (v = e.wasmBinary);
			var w,
				y = e.noExitRuntime || !0;
			function b(e, t, r, n) {
				switch (('*' === (r = r || 'i8').charAt(r.length - 1) && (r = 'i32'), r)) {
					case 'i1':
					case 'i8':
						A[e >> 0] = t;
						break;
					case 'i16':
						R[e >> 1] = t;
						break;
					case 'i32':
						B[e >> 2] = t;
						break;
					case 'i64':
						(se = [
							t >>> 0,
							((ue = t), +Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
						]),
							(B[e >> 2] = se[0]),
							(B[(e + 4) >> 2] = se[1]);
						break;
					case 'float':
						O[e >> 2] = t;
						break;
					case 'double':
						N[e >> 3] = t;
						break;
					default:
						oe('invalid type for setValue: ' + r);
				}
			}
			'object' != typeof WebAssembly && oe('no native wasm support detected');
			var _,
				E = !1;
			function k(e, t) {
				e || oe('Assertion failed: ' + t);
			}
			function F(e, t) {
				var r;
				return (r = 1 == t ? Qr(e.length) : jr(e.length)), e.subarray || e.slice ? L.set(e, r) : L.set(new Uint8Array(e), r), r;
			}
			var C = 'undefined' != typeof TextDecoder ? new TextDecoder('utf8') : void 0;
			function x(e, t, r) {
				for (var n = t + r, o = t; e[o] && !(o >= n); ) ++o;
				if (o - t > 16 && e.subarray && C) return C.decode(e.subarray(t, o));
				for (var a = ''; t < o; ) {
					var i = e[t++];
					if (128 & i) {
						var u = 63 & e[t++];
						if (192 != (224 & i)) {
							var s = 63 & e[t++];
							if ((i = 224 == (240 & i) ? ((15 & i) << 12) | (u << 6) | s : ((7 & i) << 18) | (u << 12) | (s << 6) | (63 & e[t++])) < 65536) a += String.fromCharCode(i);
							else {
								var c = i - 65536;
								a += String.fromCharCode(55296 | (c >> 10), 56320 | (1023 & c));
							}
						} else a += String.fromCharCode(((31 & i) << 6) | u);
					} else a += String.fromCharCode(i);
				}
				return a;
			}
			function S(e, t) {
				return e ? x(L, e, t) : '';
			}
			function T(e, t, r, n) {
				if (!(n > 0)) return 0;
				for (var o = r, a = r + n - 1, i = 0; i < e.length; ++i) {
					var u = e.charCodeAt(i);
					if ((u >= 55296 && u <= 57343 && (u = (65536 + ((1023 & u) << 10)) | (1023 & e.charCodeAt(++i))), u <= 127)) {
						if (r >= a) break;
						t[r++] = u;
					} else if (u <= 2047) {
						if (r + 1 >= a) break;
						(t[r++] = 192 | (u >> 6)), (t[r++] = 128 | (63 & u));
					} else if (u <= 65535) {
						if (r + 2 >= a) break;
						(t[r++] = 224 | (u >> 12)), (t[r++] = 128 | ((u >> 6) & 63)), (t[r++] = 128 | (63 & u));
					} else {
						if (r + 3 >= a) break;
						(t[r++] = 240 | (u >> 18)), (t[r++] = 128 | ((u >> 12) & 63)), (t[r++] = 128 | ((u >> 6) & 63)), (t[r++] = 128 | (63 & u));
					}
				}
				return (t[r] = 0), r - o;
			}
			function D(e, t, r) {
				return T(e, L, t, r);
			}
			function P(e) {
				for (var t = 0, r = 0; r < e.length; ++r) {
					var n = e.charCodeAt(r);
					n >= 55296 && n <= 57343 && (n = (65536 + ((1023 & n) << 10)) | (1023 & e.charCodeAt(++r))), n <= 127 ? ++t : (t += n <= 2047 ? 2 : n <= 65535 ? 3 : 4);
				}
				return t;
			}
			var M,
				A,
				L,
				R,
				I,
				B,
				U,
				O,
				N,
				j,
				z = 'undefined' != typeof TextDecoder ? new TextDecoder('utf-16le') : void 0;
			function W(e, t) {
				for (var r = e, n = r >> 1, o = n + t / 2; !(n >= o) && I[n]; ) ++n;
				if ((r = n << 1) - e > 32 && z) return z.decode(L.subarray(e, r));
				for (var a = '', i = 0; !(i >= t / 2); ++i) {
					var u = R[(e + 2 * i) >> 1];
					if (0 == u) break;
					a += String.fromCharCode(u);
				}
				return a;
			}
			function G(e, t, r) {
				if ((void 0 === r && (r = 2147483647), r < 2)) return 0;
				for (var n = t, o = (r -= 2) < 2 * e.length ? r / 2 : e.length, a = 0; a < o; ++a) {
					var i = e.charCodeAt(a);
					(R[t >> 1] = i), (t += 2);
				}
				return (R[t >> 1] = 0), t - n;
			}
			function $(e) {
				return 2 * e.length;
			}
			function X(e, t) {
				for (var r = 0, n = ''; !(r >= t / 4); ) {
					var o = B[(e + 4 * r) >> 2];
					if (0 == o) break;
					if ((++r, o >= 65536)) {
						var a = o - 65536;
						n += String.fromCharCode(55296 | (a >> 10), 56320 | (1023 & a));
					} else n += String.fromCharCode(o);
				}
				return n;
			}
			function Y(e, t, r) {
				if ((void 0 === r && (r = 2147483647), r < 4)) return 0;
				for (var n = t, o = n + r - 4, a = 0; a < e.length; ++a) {
					var i = e.charCodeAt(a);
					if ((i >= 55296 && i <= 57343 && (i = (65536 + ((1023 & i) << 10)) | (1023 & e.charCodeAt(++a))), (B[t >> 2] = i), (t += 4) + 4 > o)) break;
				}
				return (B[t >> 2] = 0), t - n;
			}
			function H(e) {
				for (var t = 0, r = 0; r < e.length; ++r) {
					var n = e.charCodeAt(r);
					n >= 55296 && n <= 57343 && ++r, (t += 4);
				}
				return t;
			}
			function V(e) {
				var t = P(e) + 1,
					r = jr(t);
				return r && T(e, A, r, t), r;
			}
			function Q(t) {
				(M = t),
					(e.HEAP8 = A = new Int8Array(t)),
					(e.HEAP16 = R = new Int16Array(t)),
					(e.HEAP32 = B = new Int32Array(t)),
					(e.HEAPU8 = L = new Uint8Array(t)),
					(e.HEAPU16 = I = new Uint16Array(t)),
					(e.HEAPU32 = U = new Uint32Array(t)),
					(e.HEAPF32 = O = new Float32Array(t)),
					(e.HEAPF64 = N = new Float64Array(t));
			}
			e.INITIAL_MEMORY;
			var K = [],
				J = [],
				Z = [],
				ee = 0,
				te = null;
			function re(t) {
				ee++, e.monitorRunDependencies && e.monitorRunDependencies(ee);
			}
			function ne(t) {
				if ((ee--, e.monitorRunDependencies && e.monitorRunDependencies(ee), 0 == ee && te)) {
					var r = te;
					(te = null), r();
				}
			}
			function oe(t) {
				e.onAbort && e.onAbort(t), f((t += '')), (E = !0), (_ = 1), (t = 'abort(' + t + '). Build with -s ASSERTIONS=1 for more info.');
				var n = new WebAssembly.RuntimeError(t);
				throw (r(n), n);
			}
			function ae(e) {
				return e.startsWith('data:application/octet-stream;base64,');
			}
			(e.preloadedImages = {}), (e.preloadedAudios = {});
			var ie,
				ue,
				se,
				ce,
				le = 'BanubaSDK.wasm';
			function fe(e) {
				try {
					if (e == le && v) return new Uint8Array(v);
					throw 'both async and sync fetching of the wasm failed';
				} catch (t) {
					oe(t);
				}
			}
			function de(t) {
				for (; t.length > 0; ) {
					var r = t.shift();
					if ('function' != typeof r) {
						var n = r.func;
						'number' == typeof n ? (void 0 === r.arg ? j.get(n)() : j.get(n)(r.arg)) : n(void 0 === r.arg ? null : r.arg);
					} else r(e);
				}
			}
			function me() {
				return y || !1;
			}
			function pe(e) {
				return (B[Nr() >> 2] = e), e;
			}
			function he(e, t) {
				var r;
				if (0 === e) r = Date.now();
				else {
					if (1 !== e && 4 !== e) return pe(28), -1;
					r = ce();
				}
				return (B[t >> 2] = (r / 1e3) | 0), (B[(t + 4) >> 2] = ((r % 1e3) * 1e3 * 1e3) | 0), 0;
			}
			ae(le) || ((ie = le), (le = e.locateFile ? e.locateFile(ie, c) : c + ie)),
				(ce = function () {
					return performance.now();
				});
			var ve = 0,
				ge = 4,
				we = 8,
				ye = 12,
				be = 13,
				_e = 16,
				Ee = [];
			function ke(e) {
				(this.excPtr = e),
					(this.ptr = e - _e),
					(this.set_type = function (e) {
						B[(this.ptr + we) >> 2] = e;
					}),
					(this.get_type = function () {
						return B[(this.ptr + we) >> 2];
					}),
					(this.set_destructor = function (e) {
						B[(this.ptr + ve) >> 2] = e;
					}),
					(this.get_destructor = function () {
						return B[(this.ptr + ve) >> 2];
					}),
					(this.set_refcount = function (e) {
						B[(this.ptr + ge) >> 2] = e;
					}),
					(this.set_caught = function (e) {
						(e = e ? 1 : 0), (A[(this.ptr + ye) >> 0] = e);
					}),
					(this.get_caught = function () {
						return 0 != A[(this.ptr + ye) >> 0];
					}),
					(this.set_rethrown = function (e) {
						(e = e ? 1 : 0), (A[(this.ptr + be) >> 0] = e);
					}),
					(this.get_rethrown = function () {
						return 0 != A[(this.ptr + be) >> 0];
					}),
					(this.init = function (e, t) {
						this.set_type(e), this.set_destructor(t), this.set_refcount(0), this.set_caught(!1), this.set_rethrown(!1);
					}),
					(this.add_ref = function () {
						var e = B[(this.ptr + ge) >> 2];
						B[(this.ptr + ge) >> 2] = e + 1;
					}),
					(this.release_ref = function () {
						var e = B[(this.ptr + ge) >> 2];
						return (B[(this.ptr + ge) >> 2] = e - 1), 1 === e;
					});
			}
			function Fe(e, t) {
				var r = new Date(1e3 * B[e >> 2]);
				(B[t >> 2] = r.getUTCSeconds()),
					(B[(t + 4) >> 2] = r.getUTCMinutes()),
					(B[(t + 8) >> 2] = r.getUTCHours()),
					(B[(t + 12) >> 2] = r.getUTCDate()),
					(B[(t + 16) >> 2] = r.getUTCMonth()),
					(B[(t + 20) >> 2] = r.getUTCFullYear() - 1900),
					(B[(t + 24) >> 2] = r.getUTCDay()),
					(B[(t + 36) >> 2] = 0),
					(B[(t + 32) >> 2] = 0);
				var n = Date.UTC(r.getUTCFullYear(), 0, 1, 0, 0, 0, 0),
					o = ((r.getTime() - n) / 864e5) | 0;
				return (B[(t + 28) >> 2] = o), Fe.GMTString || (Fe.GMTString = V('GMT')), (B[(t + 40) >> 2] = Fe.GMTString), t;
			}
			var Ce = {
				splitPath: function (e) {
					return /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);
				},
				normalizeArray: function (e, t) {
					for (var r = 0, n = e.length - 1; n >= 0; n--) {
						var o = e[n];
						'.' === o ? e.splice(n, 1) : '..' === o ? (e.splice(n, 1), r++) : r && (e.splice(n, 1), r--);
					}
					if (t) for (; r; r--) e.unshift('..');
					return e;
				},
				normalize: function (e) {
					var t = '/' === e.charAt(0),
						r = '/' === e.substr(-1);
					return (
						(e = Ce.normalizeArray(
							e.split('/').filter(function (e) {
								return !!e;
							}),
							!t
						).join('/')) ||
							t ||
							(e = '.'),
						e && r && (e += '/'),
						(t ? '/' : '') + e
					);
				},
				dirname: function (e) {
					var t = Ce.splitPath(e),
						r = t[0],
						n = t[1];
					return r || n ? (n && (n = n.substr(0, n.length - 1)), r + n) : '.';
				},
				basename: function (e) {
					if ('/' === e) return '/';
					var t = (e = (e = Ce.normalize(e)).replace(/\/$/, '')).lastIndexOf('/');
					return -1 === t ? e : e.substr(t + 1);
				},
				extname: function (e) {
					return Ce.splitPath(e)[3];
				},
				join: function () {
					var e = Array.prototype.slice.call(arguments, 0);
					return Ce.normalize(e.join('/'));
				},
				join2: function (e, t) {
					return Ce.normalize(e + '/' + t);
				}
			};
			function xe() {
				if ('object' == typeof crypto && 'function' == typeof crypto.getRandomValues) {
					var e = new Uint8Array(1);
					return function () {
						return crypto.getRandomValues(e), e[0];
					};
				}
				return function () {
					oe('randomDevice');
				};
			}
			var Se = {
					resolve: function () {
						for (var e = '', t = !1, r = arguments.length - 1; r >= -1 && !t; r--) {
							var n = r >= 0 ? arguments[r] : Me.cwd();
							if ('string' != typeof n) throw new TypeError('Arguments to path.resolve must be strings');
							if (!n) return '';
							(e = n + '/' + e), (t = '/' === n.charAt(0));
						}
						return (
							(t ? '/' : '') +
								(e = Ce.normalizeArray(
									e.split('/').filter(function (e) {
										return !!e;
									}),
									!t
								).join('/')) || '.'
						);
					},
					relative: function (e, t) {
						function r(e) {
							for (var t = 0; t < e.length && '' === e[t]; t++);
							for (var r = e.length - 1; r >= 0 && '' === e[r]; r--);
							return t > r ? [] : e.slice(t, r - t + 1);
						}
						(e = Se.resolve(e).substr(1)), (t = Se.resolve(t).substr(1));
						for (var n = r(e.split('/')), o = r(t.split('/')), a = Math.min(n.length, o.length), i = a, u = 0; u < a; u++)
							if (n[u] !== o[u]) {
								i = u;
								break;
							}
						var s = [];
						for (u = i; u < n.length; u++) s.push('..');
						return (s = s.concat(o.slice(i))).join('/');
					}
				},
				Te = {
					ttys: [],
					init: function () {},
					shutdown: function () {},
					register: function (e, t) {
						(Te.ttys[e] = { input: [], output: [], ops: t }), Me.registerDevice(e, Te.stream_ops);
					},
					stream_ops: {
						open: function (e) {
							var t = Te.ttys[e.node.rdev];
							if (!t) throw new Me.ErrnoError(43);
							(e.tty = t), (e.seekable = !1);
						},
						close: function (e) {
							e.tty.ops.flush(e.tty);
						},
						flush: function (e) {
							e.tty.ops.flush(e.tty);
						},
						read: function (e, t, r, n, o) {
							if (!e.tty || !e.tty.ops.get_char) throw new Me.ErrnoError(60);
							for (var a = 0, i = 0; i < n; i++) {
								var u;
								try {
									u = e.tty.ops.get_char(e.tty);
								} catch (s) {
									throw new Me.ErrnoError(29);
								}
								if (void 0 === u && 0 === a) throw new Me.ErrnoError(6);
								if (null == u) break;
								a++, (t[r + i] = u);
							}
							return a && (e.node.timestamp = Date.now()), a;
						},
						write: function (e, t, r, n, o) {
							if (!e.tty || !e.tty.ops.put_char) throw new Me.ErrnoError(60);
							try {
								for (var a = 0; a < n; a++) e.tty.ops.put_char(e.tty, t[r + a]);
							} catch (i) {
								throw new Me.ErrnoError(29);
							}
							return n && (e.node.timestamp = Date.now()), a;
						}
					},
					default_tty_ops: {
						get_char: function (e) {
							if (!e.input.length) {
								var t = null;
								if (
									('undefined' != typeof window && 'function' == typeof window.prompt
										? null !== (t = window.prompt('Input: ')) && (t += '\n')
										: 'function' == typeof readline && null !== (t = readline()) && (t += '\n'),
									!t)
								)
									return null;
								e.input = Ur(t, !0);
							}
							return e.input.shift();
						},
						put_char: function (e, t) {
							null === t || 10 === t ? (l(x(e.output, 0)), (e.output = [])) : 0 != t && e.output.push(t);
						},
						flush: function (e) {
							e.output && e.output.length > 0 && (l(x(e.output, 0)), (e.output = []));
						}
					},
					default_tty1_ops: {
						put_char: function (e, t) {
							null === t || 10 === t ? (f(x(e.output, 0)), (e.output = [])) : 0 != t && e.output.push(t);
						},
						flush: function (e) {
							e.output && e.output.length > 0 && (f(x(e.output, 0)), (e.output = []));
						}
					}
				};
			function De(e) {
				for (
					var t = (function (e, t) {
							return t || (t = 16), Math.ceil(e / t) * t;
						})(e, 65536),
						r = jr(t);
					e < t;

				)
					A[r + e++] = 0;
				return r;
			}
			var Pe = {
					ops_table: null,
					mount: function (e) {
						return Pe.createNode(null, '/', 16895, 0);
					},
					createNode: function (e, t, r, n) {
						if (Me.isBlkdev(r) || Me.isFIFO(r)) throw new Me.ErrnoError(63);
						Pe.ops_table ||
							(Pe.ops_table = {
								dir: {
									node: {
										getattr: Pe.node_ops.getattr,
										setattr: Pe.node_ops.setattr,
										lookup: Pe.node_ops.lookup,
										mknod: Pe.node_ops.mknod,
										rename: Pe.node_ops.rename,
										unlink: Pe.node_ops.unlink,
										rmdir: Pe.node_ops.rmdir,
										readdir: Pe.node_ops.readdir,
										symlink: Pe.node_ops.symlink
									},
									stream: { llseek: Pe.stream_ops.llseek }
								},
								file: {
									node: { getattr: Pe.node_ops.getattr, setattr: Pe.node_ops.setattr },
									stream: {
										llseek: Pe.stream_ops.llseek,
										read: Pe.stream_ops.read,
										write: Pe.stream_ops.write,
										allocate: Pe.stream_ops.allocate,
										mmap: Pe.stream_ops.mmap,
										msync: Pe.stream_ops.msync
									}
								},
								link: { node: { getattr: Pe.node_ops.getattr, setattr: Pe.node_ops.setattr, readlink: Pe.node_ops.readlink }, stream: {} },
								chrdev: { node: { getattr: Pe.node_ops.getattr, setattr: Pe.node_ops.setattr }, stream: Me.chrdev_stream_ops }
							});
						var o = Me.createNode(e, t, r, n);
						return (
							Me.isDir(o.mode)
								? ((o.node_ops = Pe.ops_table.dir.node), (o.stream_ops = Pe.ops_table.dir.stream), (o.contents = {}))
								: Me.isFile(o.mode)
								? ((o.node_ops = Pe.ops_table.file.node), (o.stream_ops = Pe.ops_table.file.stream), (o.usedBytes = 0), (o.contents = null))
								: Me.isLink(o.mode)
								? ((o.node_ops = Pe.ops_table.link.node), (o.stream_ops = Pe.ops_table.link.stream))
								: Me.isChrdev(o.mode) && ((o.node_ops = Pe.ops_table.chrdev.node), (o.stream_ops = Pe.ops_table.chrdev.stream)),
							(o.timestamp = Date.now()),
							e && ((e.contents[t] = o), (e.timestamp = o.timestamp)),
							o
						);
					},
					getFileDataAsTypedArray: function (e) {
						return e.contents ? (e.contents.subarray ? e.contents.subarray(0, e.usedBytes) : new Uint8Array(e.contents)) : new Uint8Array(0);
					},
					expandFileStorage: function (e, t) {
						var r = e.contents ? e.contents.length : 0;
						if (!(r >= t)) {
							(t = Math.max(t, (r * (r < 1048576 ? 2 : 1.125)) >>> 0)), 0 != r && (t = Math.max(t, 256));
							var n = e.contents;
							(e.contents = new Uint8Array(t)), e.usedBytes > 0 && e.contents.set(n.subarray(0, e.usedBytes), 0);
						}
					},
					resizeFileStorage: function (e, t) {
						if (e.usedBytes != t)
							if (0 == t) (e.contents = null), (e.usedBytes = 0);
							else {
								var r = e.contents;
								(e.contents = new Uint8Array(t)), r && e.contents.set(r.subarray(0, Math.min(t, e.usedBytes))), (e.usedBytes = t);
							}
					},
					node_ops: {
						getattr: function (e) {
							var t = {};
							return (
								(t.dev = Me.isChrdev(e.mode) ? e.id : 1),
								(t.ino = e.id),
								(t.mode = e.mode),
								(t.nlink = 1),
								(t.uid = 0),
								(t.gid = 0),
								(t.rdev = e.rdev),
								Me.isDir(e.mode) ? (t.size = 4096) : Me.isFile(e.mode) ? (t.size = e.usedBytes) : Me.isLink(e.mode) ? (t.size = e.link.length) : (t.size = 0),
								(t.atime = new Date(e.timestamp)),
								(t.mtime = new Date(e.timestamp)),
								(t.ctime = new Date(e.timestamp)),
								(t.blksize = 4096),
								(t.blocks = Math.ceil(t.size / t.blksize)),
								t
							);
						},
						setattr: function (e, t) {
							void 0 !== t.mode && (e.mode = t.mode), void 0 !== t.timestamp && (e.timestamp = t.timestamp), void 0 !== t.size && Pe.resizeFileStorage(e, t.size);
						},
						lookup: function (e, t) {
							throw Me.genericErrors[44];
						},
						mknod: function (e, t, r, n) {
							return Pe.createNode(e, t, r, n);
						},
						rename: function (e, t, r) {
							if (Me.isDir(e.mode)) {
								var n;
								try {
									n = Me.lookupNode(t, r);
								} catch (a) {}
								if (n) for (var o in n.contents) throw new Me.ErrnoError(55);
							}
							delete e.parent.contents[e.name], (e.parent.timestamp = Date.now()), (e.name = r), (t.contents[r] = e), (t.timestamp = e.parent.timestamp), (e.parent = t);
						},
						unlink: function (e, t) {
							delete e.contents[t], (e.timestamp = Date.now());
						},
						rmdir: function (e, t) {
							var r = Me.lookupNode(e, t);
							for (var n in r.contents) throw new Me.ErrnoError(55);
							delete e.contents[t], (e.timestamp = Date.now());
						},
						readdir: function (e) {
							var t = ['.', '..'];
							for (var r in e.contents) e.contents.hasOwnProperty(r) && t.push(r);
							return t;
						},
						symlink: function (e, t, r) {
							var n = Pe.createNode(e, t, 41471, 0);
							return (n.link = r), n;
						},
						readlink: function (e) {
							if (!Me.isLink(e.mode)) throw new Me.ErrnoError(28);
							return e.link;
						}
					},
					stream_ops: {
						read: function (e, t, r, n, o) {
							var a = e.node.contents;
							if (o >= e.node.usedBytes) return 0;
							var i = Math.min(e.node.usedBytes - o, n);
							if (i > 8 && a.subarray) t.set(a.subarray(o, o + i), r);
							else for (var u = 0; u < i; u++) t[r + u] = a[o + u];
							return i;
						},
						write: function (e, t, r, n, o, a) {
							if ((t.buffer === A.buffer && (a = !1), !n)) return 0;
							var i = e.node;
							if (((i.timestamp = Date.now()), t.subarray && (!i.contents || i.contents.subarray))) {
								if (a) return (i.contents = t.subarray(r, r + n)), (i.usedBytes = n), n;
								if (0 === i.usedBytes && 0 === o) return (i.contents = t.slice(r, r + n)), (i.usedBytes = n), n;
								if (o + n <= i.usedBytes) return i.contents.set(t.subarray(r, r + n), o), n;
							}
							if ((Pe.expandFileStorage(i, o + n), i.contents.subarray && t.subarray)) i.contents.set(t.subarray(r, r + n), o);
							else for (var u = 0; u < n; u++) i.contents[o + u] = t[r + u];
							return (i.usedBytes = Math.max(i.usedBytes, o + n)), n;
						},
						llseek: function (e, t, r) {
							var n = t;
							if ((1 === r ? (n += e.position) : 2 === r && Me.isFile(e.node.mode) && (n += e.node.usedBytes), n < 0)) throw new Me.ErrnoError(28);
							return n;
						},
						allocate: function (e, t, r) {
							Pe.expandFileStorage(e.node, t + r), (e.node.usedBytes = Math.max(e.node.usedBytes, t + r));
						},
						mmap: function (e, t, r, n, o, a) {
							if (0 !== t) throw new Me.ErrnoError(28);
							if (!Me.isFile(e.node.mode)) throw new Me.ErrnoError(43);
							var i,
								u,
								s = e.node.contents;
							if (2 & a || s.buffer !== M) {
								if (((n > 0 || n + r < s.length) && (s = s.subarray ? s.subarray(n, n + r) : Array.prototype.slice.call(s, n, n + r)), (u = !0), !(i = De(r))))
									throw new Me.ErrnoError(48);
								A.set(s, i);
							} else (u = !1), (i = s.byteOffset);
							return { ptr: i, allocated: u };
						},
						msync: function (e, t, r, n, o) {
							if (!Me.isFile(e.node.mode)) throw new Me.ErrnoError(43);
							return 2 & o || Pe.stream_ops.write(e, t, 0, n, r, !1), 0;
						}
					}
				},
				Me = {
					root: null,
					mounts: [],
					devices: {},
					streams: [],
					nextInode: 1,
					nameTable: null,
					currentPath: '/',
					initialized: !1,
					ignorePermissions: !0,
					trackingDelegate: {},
					tracking: { openFlags: { READ: 1, WRITE: 2 } },
					ErrnoError: null,
					genericErrors: {},
					filesystems: null,
					syncFSRequests: 0,
					lookupPath: function (e, t) {
						if (((t = t || {}), !(e = Se.resolve(Me.cwd(), e)))) return { path: '', node: null };
						var r = { follow_mount: !0, recurse_count: 0 };
						for (var n in r) void 0 === t[n] && (t[n] = r[n]);
						if (t.recurse_count > 8) throw new Me.ErrnoError(32);
						for (
							var o = Ce.normalizeArray(
									e.split('/').filter(function (e) {
										return !!e;
									}),
									!1
								),
								a = Me.root,
								i = '/',
								u = 0;
							u < o.length;
							u++
						) {
							var s = u === o.length - 1;
							if (s && t.parent) break;
							if (((a = Me.lookupNode(a, o[u])), (i = Ce.join2(i, o[u])), Me.isMountpoint(a) && (!s || (s && t.follow_mount)) && (a = a.mounted.root), !s || t.follow))
								for (var c = 0; Me.isLink(a.mode); ) {
									var l = Me.readlink(i);
									if (((i = Se.resolve(Ce.dirname(i), l)), (a = Me.lookupPath(i, { recurse_count: t.recurse_count }).node), c++ > 40)) throw new Me.ErrnoError(32);
								}
						}
						return { path: i, node: a };
					},
					getPath: function (e) {
						for (var t; ; ) {
							if (Me.isRoot(e)) {
								var r = e.mount.mountpoint;
								return t ? ('/' !== r[r.length - 1] ? r + '/' + t : r + t) : r;
							}
							(t = t ? e.name + '/' + t : e.name), (e = e.parent);
						}
					},
					hashName: function (e, t) {
						for (var r = 0, n = 0; n < t.length; n++) r = ((r << 5) - r + t.charCodeAt(n)) | 0;
						return ((e + r) >>> 0) % Me.nameTable.length;
					},
					hashAddNode: function (e) {
						var t = Me.hashName(e.parent.id, e.name);
						(e.name_next = Me.nameTable[t]), (Me.nameTable[t] = e);
					},
					hashRemoveNode: function (e) {
						var t = Me.hashName(e.parent.id, e.name);
						if (Me.nameTable[t] === e) Me.nameTable[t] = e.name_next;
						else
							for (var r = Me.nameTable[t]; r; ) {
								if (r.name_next === e) {
									r.name_next = e.name_next;
									break;
								}
								r = r.name_next;
							}
					},
					lookupNode: function (e, t) {
						var r = Me.mayLookup(e);
						if (r) throw new Me.ErrnoError(r, e);
						for (var n = Me.hashName(e.id, t), o = Me.nameTable[n]; o; o = o.name_next) {
							var a = o.name;
							if (o.parent.id === e.id && a === t) return o;
						}
						return Me.lookup(e, t);
					},
					createNode: function (e, t, r, n) {
						var o = new Me.FSNode(e, t, r, n);
						return Me.hashAddNode(o), o;
					},
					destroyNode: function (e) {
						Me.hashRemoveNode(e);
					},
					isRoot: function (e) {
						return e === e.parent;
					},
					isMountpoint: function (e) {
						return !!e.mounted;
					},
					isFile: function (e) {
						return 32768 == (61440 & e);
					},
					isDir: function (e) {
						return 16384 == (61440 & e);
					},
					isLink: function (e) {
						return 40960 == (61440 & e);
					},
					isChrdev: function (e) {
						return 8192 == (61440 & e);
					},
					isBlkdev: function (e) {
						return 24576 == (61440 & e);
					},
					isFIFO: function (e) {
						return 4096 == (61440 & e);
					},
					isSocket: function (e) {
						return 49152 == (49152 & e);
					},
					flagModes: { r: 0, 'r+': 2, w: 577, 'w+': 578, a: 1089, 'a+': 1090 },
					modeStringToFlags: function (e) {
						var t = Me.flagModes[e];
						if (void 0 === t) throw new Error('Unknown file open mode: ' + e);
						return t;
					},
					flagsToPermissionString: function (e) {
						var t = ['r', 'w', 'rw'][3 & e];
						return 512 & e && (t += 'w'), t;
					},
					nodePermissions: function (e, t) {
						return Me.ignorePermissions || ((!t.includes('r') || 292 & e.mode) && (!t.includes('w') || 146 & e.mode) && (!t.includes('x') || 73 & e.mode)) ? 0 : 2;
					},
					mayLookup: function (e) {
						var t = Me.nodePermissions(e, 'x');
						return t || (e.node_ops.lookup ? 0 : 2);
					},
					mayCreate: function (e, t) {
						try {
							return Me.lookupNode(e, t), 20;
						} catch (r) {}
						return Me.nodePermissions(e, 'wx');
					},
					mayDelete: function (e, t, r) {
						var n;
						try {
							n = Me.lookupNode(e, t);
						} catch (a) {
							return a.errno;
						}
						var o = Me.nodePermissions(e, 'wx');
						if (o) return o;
						if (r) {
							if (!Me.isDir(n.mode)) return 54;
							if (Me.isRoot(n) || Me.getPath(n) === Me.cwd()) return 10;
						} else if (Me.isDir(n.mode)) return 31;
						return 0;
					},
					mayOpen: function (e, t) {
						return e ? (Me.isLink(e.mode) ? 32 : Me.isDir(e.mode) && ('r' !== Me.flagsToPermissionString(t) || 512 & t) ? 31 : Me.nodePermissions(e, Me.flagsToPermissionString(t))) : 44;
					},
					MAX_OPEN_FDS: 4096,
					nextfd: function (e, t) {
						(e = e || 0), (t = t || Me.MAX_OPEN_FDS);
						for (var r = e; r <= t; r++) if (!Me.streams[r]) return r;
						throw new Me.ErrnoError(33);
					},
					getStream: function (e) {
						return Me.streams[e];
					},
					createStream: function (e, t, r) {
						Me.FSStream ||
							((Me.FSStream = function () {}),
							(Me.FSStream.prototype = {
								object: {
									get: function () {
										return this.node;
									},
									set: function (e) {
										this.node = e;
									}
								},
								isRead: {
									get: function () {
										return 1 != (2097155 & this.flags);
									}
								},
								isWrite: {
									get: function () {
										return 0 != (2097155 & this.flags);
									}
								},
								isAppend: {
									get: function () {
										return 1024 & this.flags;
									}
								}
							}));
						var n = new Me.FSStream();
						for (var o in e) n[o] = e[o];
						e = n;
						var a = Me.nextfd(t, r);
						return (e.fd = a), (Me.streams[a] = e), e;
					},
					closeStream: function (e) {
						Me.streams[e] = null;
					},
					chrdev_stream_ops: {
						open: function (e) {
							var t = Me.getDevice(e.node.rdev);
							(e.stream_ops = t.stream_ops), e.stream_ops.open && e.stream_ops.open(e);
						},
						llseek: function () {
							throw new Me.ErrnoError(70);
						}
					},
					major: function (e) {
						return e >> 8;
					},
					minor: function (e) {
						return 255 & e;
					},
					makedev: function (e, t) {
						return (e << 8) | t;
					},
					registerDevice: function (e, t) {
						Me.devices[e] = { stream_ops: t };
					},
					getDevice: function (e) {
						return Me.devices[e];
					},
					getMounts: function (e) {
						for (var t = [], r = [e]; r.length; ) {
							var n = r.pop();
							t.push(n), r.push.apply(r, n.mounts);
						}
						return t;
					},
					syncfs: function (e, t) {
						'function' == typeof e && ((t = e), (e = !1)),
							Me.syncFSRequests++,
							Me.syncFSRequests > 1 && f('warning: ' + Me.syncFSRequests + ' FS.syncfs operations in flight at once, probably just doing extra work');
						var r = Me.getMounts(Me.root.mount),
							n = 0;
						function o(e) {
							return Me.syncFSRequests--, t(e);
						}
						function a(e) {
							if (e) return a.errored ? void 0 : ((a.errored = !0), o(e));
							++n >= r.length && o(null);
						}
						r.forEach(function (t) {
							if (!t.type.syncfs) return a(null);
							t.type.syncfs(t, e, a);
						});
					},
					mount: function (e, t, r) {
						var n,
							o = '/' === r,
							a = !r;
						if (o && Me.root) throw new Me.ErrnoError(10);
						if (!o && !a) {
							var i = Me.lookupPath(r, { follow_mount: !1 });
							if (((r = i.path), (n = i.node), Me.isMountpoint(n))) throw new Me.ErrnoError(10);
							if (!Me.isDir(n.mode)) throw new Me.ErrnoError(54);
						}
						var u = { type: e, opts: t, mountpoint: r, mounts: [] },
							s = e.mount(u);
						return (s.mount = u), (u.root = s), o ? (Me.root = s) : n && ((n.mounted = u), n.mount && n.mount.mounts.push(u)), s;
					},
					unmount: function (e) {
						var t = Me.lookupPath(e, { follow_mount: !1 });
						if (!Me.isMountpoint(t.node)) throw new Me.ErrnoError(28);
						var r = t.node,
							n = r.mounted,
							o = Me.getMounts(n);
						Object.keys(Me.nameTable).forEach(function (e) {
							for (var t = Me.nameTable[e]; t; ) {
								var r = t.name_next;
								o.includes(t.mount) && Me.destroyNode(t), (t = r);
							}
						}),
							(r.mounted = null);
						var a = r.mount.mounts.indexOf(n);
						r.mount.mounts.splice(a, 1);
					},
					lookup: function (e, t) {
						return e.node_ops.lookup(e, t);
					},
					mknod: function (e, t, r) {
						var n = Me.lookupPath(e, { parent: !0 }).node,
							o = Ce.basename(e);
						if (!o || '.' === o || '..' === o) throw new Me.ErrnoError(28);
						var a = Me.mayCreate(n, o);
						if (a) throw new Me.ErrnoError(a);
						if (!n.node_ops.mknod) throw new Me.ErrnoError(63);
						return n.node_ops.mknod(n, o, t, r);
					},
					create: function (e, t) {
						return (t = void 0 !== t ? t : 438), (t &= 4095), (t |= 32768), Me.mknod(e, t, 0);
					},
					mkdir: function (e, t) {
						return (t = void 0 !== t ? t : 511), (t &= 1023), (t |= 16384), Me.mknod(e, t, 0);
					},
					mkdirTree: function (e, t) {
						for (var r = e.split('/'), n = '', o = 0; o < r.length; ++o)
							if (r[o]) {
								n += '/' + r[o];
								try {
									Me.mkdir(n, t);
								} catch (a) {
									if (20 != a.errno) throw a;
								}
							}
					},
					mkdev: function (e, t, r) {
						return void 0 === r && ((r = t), (t = 438)), (t |= 8192), Me.mknod(e, t, r);
					},
					symlink: function (e, t) {
						if (!Se.resolve(e)) throw new Me.ErrnoError(44);
						var r = Me.lookupPath(t, { parent: !0 }).node;
						if (!r) throw new Me.ErrnoError(44);
						var n = Ce.basename(t),
							o = Me.mayCreate(r, n);
						if (o) throw new Me.ErrnoError(o);
						if (!r.node_ops.symlink) throw new Me.ErrnoError(63);
						return r.node_ops.symlink(r, n, e);
					},
					rename: function (e, t) {
						var r,
							n,
							o = Ce.dirname(e),
							a = Ce.dirname(t),
							i = Ce.basename(e),
							u = Ce.basename(t);
						if (((r = Me.lookupPath(e, { parent: !0 }).node), (n = Me.lookupPath(t, { parent: !0 }).node), !r || !n)) throw new Me.ErrnoError(44);
						if (r.mount !== n.mount) throw new Me.ErrnoError(75);
						var s,
							c = Me.lookupNode(r, i),
							l = Se.relative(e, a);
						if ('.' !== l.charAt(0)) throw new Me.ErrnoError(28);
						if ('.' !== (l = Se.relative(t, o)).charAt(0)) throw new Me.ErrnoError(55);
						try {
							s = Me.lookupNode(n, u);
						} catch (p) {}
						if (c !== s) {
							var d = Me.isDir(c.mode),
								m = Me.mayDelete(r, i, d);
							if (m) throw new Me.ErrnoError(m);
							if ((m = s ? Me.mayDelete(n, u, d) : Me.mayCreate(n, u))) throw new Me.ErrnoError(m);
							if (!r.node_ops.rename) throw new Me.ErrnoError(63);
							if (Me.isMountpoint(c) || (s && Me.isMountpoint(s))) throw new Me.ErrnoError(10);
							if (n !== r && (m = Me.nodePermissions(r, 'w'))) throw new Me.ErrnoError(m);
							try {
								Me.trackingDelegate.willMovePath && Me.trackingDelegate.willMovePath(e, t);
							} catch (p) {
								f("FS.trackingDelegate['willMovePath']('" + e + "', '" + t + "') threw an exception: " + p.message);
							}
							Me.hashRemoveNode(c);
							try {
								r.node_ops.rename(c, n, u);
							} catch (p) {
								throw p;
							} finally {
								Me.hashAddNode(c);
							}
							try {
								Me.trackingDelegate.onMovePath && Me.trackingDelegate.onMovePath(e, t);
							} catch (p) {
								f("FS.trackingDelegate['onMovePath']('" + e + "', '" + t + "') threw an exception: " + p.message);
							}
						}
					},
					rmdir: function (e) {
						var t = Me.lookupPath(e, { parent: !0 }).node,
							r = Ce.basename(e),
							n = Me.lookupNode(t, r),
							o = Me.mayDelete(t, r, !0);
						if (o) throw new Me.ErrnoError(o);
						if (!t.node_ops.rmdir) throw new Me.ErrnoError(63);
						if (Me.isMountpoint(n)) throw new Me.ErrnoError(10);
						try {
							Me.trackingDelegate.willDeletePath && Me.trackingDelegate.willDeletePath(e);
						} catch (a) {
							f("FS.trackingDelegate['willDeletePath']('" + e + "') threw an exception: " + a.message);
						}
						t.node_ops.rmdir(t, r), Me.destroyNode(n);
						try {
							Me.trackingDelegate.onDeletePath && Me.trackingDelegate.onDeletePath(e);
						} catch (a) {
							f("FS.trackingDelegate['onDeletePath']('" + e + "') threw an exception: " + a.message);
						}
					},
					readdir: function (e) {
						var t = Me.lookupPath(e, { follow: !0 }).node;
						if (!t.node_ops.readdir) throw new Me.ErrnoError(54);
						return t.node_ops.readdir(t);
					},
					unlink: function (e) {
						var t = Me.lookupPath(e, { parent: !0 }).node,
							r = Ce.basename(e),
							n = Me.lookupNode(t, r),
							o = Me.mayDelete(t, r, !1);
						if (o) throw new Me.ErrnoError(o);
						if (!t.node_ops.unlink) throw new Me.ErrnoError(63);
						if (Me.isMountpoint(n)) throw new Me.ErrnoError(10);
						try {
							Me.trackingDelegate.willDeletePath && Me.trackingDelegate.willDeletePath(e);
						} catch (a) {
							f("FS.trackingDelegate['willDeletePath']('" + e + "') threw an exception: " + a.message);
						}
						t.node_ops.unlink(t, r), Me.destroyNode(n);
						try {
							Me.trackingDelegate.onDeletePath && Me.trackingDelegate.onDeletePath(e);
						} catch (a) {
							f("FS.trackingDelegate['onDeletePath']('" + e + "') threw an exception: " + a.message);
						}
					},
					readlink: function (e) {
						var t = Me.lookupPath(e).node;
						if (!t) throw new Me.ErrnoError(44);
						if (!t.node_ops.readlink) throw new Me.ErrnoError(28);
						return Se.resolve(Me.getPath(t.parent), t.node_ops.readlink(t));
					},
					stat: function (e, t) {
						var r = Me.lookupPath(e, { follow: !t }).node;
						if (!r) throw new Me.ErrnoError(44);
						if (!r.node_ops.getattr) throw new Me.ErrnoError(63);
						return r.node_ops.getattr(r);
					},
					lstat: function (e) {
						return Me.stat(e, !0);
					},
					chmod: function (e, t, r) {
						var n;
						if (!(n = 'string' == typeof e ? Me.lookupPath(e, { follow: !r }).node : e).node_ops.setattr) throw new Me.ErrnoError(63);
						n.node_ops.setattr(n, { mode: (4095 & t) | (-4096 & n.mode), timestamp: Date.now() });
					},
					lchmod: function (e, t) {
						Me.chmod(e, t, !0);
					},
					fchmod: function (e, t) {
						var r = Me.getStream(e);
						if (!r) throw new Me.ErrnoError(8);
						Me.chmod(r.node, t);
					},
					chown: function (e, t, r, n) {
						var o;
						if (!(o = 'string' == typeof e ? Me.lookupPath(e, { follow: !n }).node : e).node_ops.setattr) throw new Me.ErrnoError(63);
						o.node_ops.setattr(o, { timestamp: Date.now() });
					},
					lchown: function (e, t, r) {
						Me.chown(e, t, r, !0);
					},
					fchown: function (e, t, r) {
						var n = Me.getStream(e);
						if (!n) throw new Me.ErrnoError(8);
						Me.chown(n.node, t, r);
					},
					truncate: function (e, t) {
						if (t < 0) throw new Me.ErrnoError(28);
						var r;
						if (!(r = 'string' == typeof e ? Me.lookupPath(e, { follow: !0 }).node : e).node_ops.setattr) throw new Me.ErrnoError(63);
						if (Me.isDir(r.mode)) throw new Me.ErrnoError(31);
						if (!Me.isFile(r.mode)) throw new Me.ErrnoError(28);
						var n = Me.nodePermissions(r, 'w');
						if (n) throw new Me.ErrnoError(n);
						r.node_ops.setattr(r, { size: t, timestamp: Date.now() });
					},
					ftruncate: function (e, t) {
						var r = Me.getStream(e);
						if (!r) throw new Me.ErrnoError(8);
						if (0 == (2097155 & r.flags)) throw new Me.ErrnoError(28);
						Me.truncate(r.node, t);
					},
					utime: function (e, t, r) {
						var n = Me.lookupPath(e, { follow: !0 }).node;
						n.node_ops.setattr(n, { timestamp: Math.max(t, r) });
					},
					open: function (t, r, n, o, a) {
						if ('' === t) throw new Me.ErrnoError(44);
						var i;
						if (((n = void 0 === n ? 438 : n), (n = 64 & (r = 'string' == typeof r ? Me.modeStringToFlags(r) : r) ? (4095 & n) | 32768 : 0), 'object' == typeof t)) i = t;
						else {
							t = Ce.normalize(t);
							try {
								i = Me.lookupPath(t, { follow: !(131072 & r) }).node;
							} catch (d) {}
						}
						var u = !1;
						if (64 & r)
							if (i) {
								if (128 & r) throw new Me.ErrnoError(20);
							} else (i = Me.mknod(t, n, 0)), (u = !0);
						if (!i) throw new Me.ErrnoError(44);
						if ((Me.isChrdev(i.mode) && (r &= -513), 65536 & r && !Me.isDir(i.mode))) throw new Me.ErrnoError(54);
						if (!u) {
							var s = Me.mayOpen(i, r);
							if (s) throw new Me.ErrnoError(s);
						}
						512 & r && Me.truncate(i, 0), (r &= -131713);
						var c = Me.createStream({ node: i, path: Me.getPath(i), flags: r, seekable: !0, position: 0, stream_ops: i.stream_ops, ungotten: [], error: !1 }, o, a);
						c.stream_ops.open && c.stream_ops.open(c),
							!e.logReadFiles || 1 & r || (Me.readFiles || (Me.readFiles = {}), t in Me.readFiles || ((Me.readFiles[t] = 1), f('FS.trackingDelegate error on read file: ' + t)));
						try {
							if (Me.trackingDelegate.onOpenFile) {
								var l = 0;
								1 != (2097155 & r) && (l |= Me.tracking.openFlags.READ), 0 != (2097155 & r) && (l |= Me.tracking.openFlags.WRITE), Me.trackingDelegate.onOpenFile(t, l);
							}
						} catch (d) {
							f("FS.trackingDelegate['onOpenFile']('" + t + "', flags) threw an exception: " + d.message);
						}
						return c;
					},
					close: function (e) {
						if (Me.isClosed(e)) throw new Me.ErrnoError(8);
						e.getdents && (e.getdents = null);
						try {
							e.stream_ops.close && e.stream_ops.close(e);
						} catch (t) {
							throw t;
						} finally {
							Me.closeStream(e.fd);
						}
						e.fd = null;
					},
					isClosed: function (e) {
						return null === e.fd;
					},
					llseek: function (e, t, r) {
						if (Me.isClosed(e)) throw new Me.ErrnoError(8);
						if (!e.seekable || !e.stream_ops.llseek) throw new Me.ErrnoError(70);
						if (0 != r && 1 != r && 2 != r) throw new Me.ErrnoError(28);
						return (e.position = e.stream_ops.llseek(e, t, r)), (e.ungotten = []), e.position;
					},
					read: function (e, t, r, n, o) {
						if (n < 0 || o < 0) throw new Me.ErrnoError(28);
						if (Me.isClosed(e)) throw new Me.ErrnoError(8);
						if (1 == (2097155 & e.flags)) throw new Me.ErrnoError(8);
						if (Me.isDir(e.node.mode)) throw new Me.ErrnoError(31);
						if (!e.stream_ops.read) throw new Me.ErrnoError(28);
						var a = void 0 !== o;
						if (a) {
							if (!e.seekable) throw new Me.ErrnoError(70);
						} else o = e.position;
						var i = e.stream_ops.read(e, t, r, n, o);
						return a || (e.position += i), i;
					},
					write: function (e, t, r, n, o, a) {
						if (n < 0 || o < 0) throw new Me.ErrnoError(28);
						if (Me.isClosed(e)) throw new Me.ErrnoError(8);
						if (0 == (2097155 & e.flags)) throw new Me.ErrnoError(8);
						if (Me.isDir(e.node.mode)) throw new Me.ErrnoError(31);
						if (!e.stream_ops.write) throw new Me.ErrnoError(28);
						e.seekable && 1024 & e.flags && Me.llseek(e, 0, 2);
						var i = void 0 !== o;
						if (i) {
							if (!e.seekable) throw new Me.ErrnoError(70);
						} else o = e.position;
						var u = e.stream_ops.write(e, t, r, n, o, a);
						i || (e.position += u);
						try {
							e.path && Me.trackingDelegate.onWriteToFile && Me.trackingDelegate.onWriteToFile(e.path);
						} catch (s) {
							f("FS.trackingDelegate['onWriteToFile']('" + e.path + "') threw an exception: " + s.message);
						}
						return u;
					},
					allocate: function (e, t, r) {
						if (Me.isClosed(e)) throw new Me.ErrnoError(8);
						if (t < 0 || r <= 0) throw new Me.ErrnoError(28);
						if (0 == (2097155 & e.flags)) throw new Me.ErrnoError(8);
						if (!Me.isFile(e.node.mode) && !Me.isDir(e.node.mode)) throw new Me.ErrnoError(43);
						if (!e.stream_ops.allocate) throw new Me.ErrnoError(138);
						e.stream_ops.allocate(e, t, r);
					},
					mmap: function (e, t, r, n, o, a) {
						if (0 != (2 & o) && 0 == (2 & a) && 2 != (2097155 & e.flags)) throw new Me.ErrnoError(2);
						if (1 == (2097155 & e.flags)) throw new Me.ErrnoError(2);
						if (!e.stream_ops.mmap) throw new Me.ErrnoError(43);
						return e.stream_ops.mmap(e, t, r, n, o, a);
					},
					msync: function (e, t, r, n, o) {
						return e && e.stream_ops.msync ? e.stream_ops.msync(e, t, r, n, o) : 0;
					},
					munmap: function (e) {
						return 0;
					},
					ioctl: function (e, t, r) {
						if (!e.stream_ops.ioctl) throw new Me.ErrnoError(59);
						return e.stream_ops.ioctl(e, t, r);
					},
					readFile: function (e, t) {
						if ((((t = t || {}).flags = t.flags || 0), (t.encoding = t.encoding || 'binary'), 'utf8' !== t.encoding && 'binary' !== t.encoding))
							throw new Error('Invalid encoding type "' + t.encoding + '"');
						var r,
							n = Me.open(e, t.flags),
							o = Me.stat(e).size,
							a = new Uint8Array(o);
						return Me.read(n, a, 0, o, 0), 'utf8' === t.encoding ? (r = x(a, 0)) : 'binary' === t.encoding && (r = a), Me.close(n), r;
					},
					writeFile: function (e, t, r) {
						(r = r || {}).flags = r.flags || 577;
						var n = Me.open(e, r.flags, r.mode);
						if ('string' == typeof t) {
							var o = new Uint8Array(P(t) + 1),
								a = T(t, o, 0, o.length);
							Me.write(n, o, 0, a, void 0, r.canOwn);
						} else {
							if (!ArrayBuffer.isView(t)) throw new Error('Unsupported data type');
							Me.write(n, t, 0, t.byteLength, void 0, r.canOwn);
						}
						Me.close(n);
					},
					cwd: function () {
						return Me.currentPath;
					},
					chdir: function (e) {
						var t = Me.lookupPath(e, { follow: !0 });
						if (null === t.node) throw new Me.ErrnoError(44);
						if (!Me.isDir(t.node.mode)) throw new Me.ErrnoError(54);
						var r = Me.nodePermissions(t.node, 'x');
						if (r) throw new Me.ErrnoError(r);
						Me.currentPath = t.path;
					},
					createDefaultDirectories: function () {
						Me.mkdir('/tmp'), Me.mkdir('/home'), Me.mkdir('/home/web_user');
					},
					createDefaultDevices: function () {
						Me.mkdir('/dev'),
							Me.registerDevice(Me.makedev(1, 3), {
								read: function () {
									return 0;
								},
								write: function (e, t, r, n, o) {
									return n;
								}
							}),
							Me.mkdev('/dev/null', Me.makedev(1, 3)),
							Te.register(Me.makedev(5, 0), Te.default_tty_ops),
							Te.register(Me.makedev(6, 0), Te.default_tty1_ops),
							Me.mkdev('/dev/tty', Me.makedev(5, 0)),
							Me.mkdev('/dev/tty1', Me.makedev(6, 0));
						var e = xe();
						Me.createDevice('/dev', 'random', e), Me.createDevice('/dev', 'urandom', e), Me.mkdir('/dev/shm'), Me.mkdir('/dev/shm/tmp');
					},
					createSpecialDirectories: function () {
						Me.mkdir('/proc');
						var e = Me.mkdir('/proc/self');
						Me.mkdir('/proc/self/fd'),
							Me.mount(
								{
									mount: function () {
										var t = Me.createNode(e, 'fd', 16895, 73);
										return (
											(t.node_ops = {
												lookup: function (e, t) {
													var r = +t,
														n = Me.getStream(r);
													if (!n) throw new Me.ErrnoError(8);
													var o = {
														parent: null,
														mount: { mountpoint: 'fake' },
														node_ops: {
															readlink: function () {
																return n.path;
															}
														}
													};
													return (o.parent = o), o;
												}
											}),
											t
										);
									}
								},
								{},
								'/proc/self/fd'
							);
					},
					createStandardStreams: function () {
						e.stdin ? Me.createDevice('/dev', 'stdin', e.stdin) : Me.symlink('/dev/tty', '/dev/stdin'),
							e.stdout ? Me.createDevice('/dev', 'stdout', null, e.stdout) : Me.symlink('/dev/tty', '/dev/stdout'),
							e.stderr ? Me.createDevice('/dev', 'stderr', null, e.stderr) : Me.symlink('/dev/tty1', '/dev/stderr'),
							Me.open('/dev/stdin', 0),
							Me.open('/dev/stdout', 1),
							Me.open('/dev/stderr', 1);
					},
					ensureErrnoError: function () {
						Me.ErrnoError ||
							((Me.ErrnoError = function (e, t) {
								(this.node = t),
									(this.setErrno = function (e) {
										this.errno = e;
									}),
									this.setErrno(e),
									(this.message = 'FS error');
							}),
							(Me.ErrnoError.prototype = new Error()),
							(Me.ErrnoError.prototype.constructor = Me.ErrnoError),
							[44].forEach(function (e) {
								(Me.genericErrors[e] = new Me.ErrnoError(e)), (Me.genericErrors[e].stack = '<generic error, no stack>');
							}));
					},
					staticInit: function () {
						Me.ensureErrnoError(),
							(Me.nameTable = new Array(4096)),
							Me.mount(Pe, {}, '/'),
							Me.createDefaultDirectories(),
							Me.createDefaultDevices(),
							Me.createSpecialDirectories(),
							(Me.filesystems = { MEMFS: Pe });
					},
					init: function (t, r, n) {
						(Me.init.initialized = !0), Me.ensureErrnoError(), (e.stdin = t || e.stdin), (e.stdout = r || e.stdout), (e.stderr = n || e.stderr), Me.createStandardStreams();
					},
					quit: function () {
						Me.init.initialized = !1;
						var t = e._fflush;
						t && t(0);
						for (var r = 0; r < Me.streams.length; r++) {
							var n = Me.streams[r];
							n && Me.close(n);
						}
					},
					getMode: function (e, t) {
						var r = 0;
						return e && (r |= 365), t && (r |= 146), r;
					},
					findObject: function (e, t) {
						var r = Me.analyzePath(e, t);
						return r.exists ? r.object : null;
					},
					analyzePath: function (e, t) {
						try {
							e = (n = Me.lookupPath(e, { follow: !t })).path;
						} catch (o) {}
						var r = { isRoot: !1, exists: !1, error: 0, name: null, path: null, object: null, parentExists: !1, parentPath: null, parentObject: null };
						try {
							var n = Me.lookupPath(e, { parent: !0 });
							(r.parentExists = !0),
								(r.parentPath = n.path),
								(r.parentObject = n.node),
								(r.name = Ce.basename(e)),
								(n = Me.lookupPath(e, { follow: !t })),
								(r.exists = !0),
								(r.path = n.path),
								(r.object = n.node),
								(r.name = n.node.name),
								(r.isRoot = '/' === n.path);
						} catch (o) {
							r.error = o.errno;
						}
						return r;
					},
					createPath: function (e, t, r, n) {
						e = 'string' == typeof e ? e : Me.getPath(e);
						for (var o = t.split('/').reverse(); o.length; ) {
							var a = o.pop();
							if (a) {
								var i = Ce.join2(e, a);
								try {
									Me.mkdir(i);
								} catch (u) {}
								e = i;
							}
						}
						return i;
					},
					createFile: function (e, t, r, n, o) {
						var a = Ce.join2('string' == typeof e ? e : Me.getPath(e), t),
							i = Me.getMode(n, o);
						return Me.create(a, i);
					},
					createDataFile: function (e, t, r, n, o, a) {
						var i = t ? Ce.join2('string' == typeof e ? e : Me.getPath(e), t) : e,
							u = Me.getMode(n, o),
							s = Me.create(i, u);
						if (r) {
							if ('string' == typeof r) {
								for (var c = new Array(r.length), l = 0, f = r.length; l < f; ++l) c[l] = r.charCodeAt(l);
								r = c;
							}
							Me.chmod(s, 146 | u);
							var d = Me.open(s, 577);
							Me.write(d, r, 0, r.length, 0, a), Me.close(d), Me.chmod(s, u);
						}
						return s;
					},
					createDevice: function (e, t, r, n) {
						var o = Ce.join2('string' == typeof e ? e : Me.getPath(e), t),
							a = Me.getMode(!!r, !!n);
						Me.createDevice.major || (Me.createDevice.major = 64);
						var i = Me.makedev(Me.createDevice.major++, 0);
						return (
							Me.registerDevice(i, {
								open: function (e) {
									e.seekable = !1;
								},
								close: function (e) {
									n && n.buffer && n.buffer.length && n(10);
								},
								read: function (e, t, n, o, a) {
									for (var i = 0, u = 0; u < o; u++) {
										var s;
										try {
											s = r();
										} catch (c) {
											throw new Me.ErrnoError(29);
										}
										if (void 0 === s && 0 === i) throw new Me.ErrnoError(6);
										if (null == s) break;
										i++, (t[n + u] = s);
									}
									return i && (e.node.timestamp = Date.now()), i;
								},
								write: function (e, t, r, o, a) {
									for (var i = 0; i < o; i++)
										try {
											n(t[r + i]);
										} catch (u) {
											throw new Me.ErrnoError(29);
										}
									return o && (e.node.timestamp = Date.now()), i;
								}
							}),
							Me.mkdev(o, a, i)
						);
					},
					forceLoadFile: function (e) {
						if (e.isDevice || e.isFolder || e.link || e.contents) return !0;
						if ('undefined' != typeof XMLHttpRequest)
							throw new Error(
								'Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.'
							);
						if (!a) throw new Error('Cannot load without read() or XMLHttpRequest.');
						try {
							(e.contents = Ur(a(e.url), !0)), (e.usedBytes = e.contents.length);
						} catch (t) {
							throw new Me.ErrnoError(29);
						}
					},
					createLazyFile: function (e, t, r, n, o) {
						function a() {
							(this.lengthKnown = !1), (this.chunks = []);
						}
						if (
							((a.prototype.get = function (e) {
								if (!(e > this.length - 1 || e < 0)) {
									var t = e % this.chunkSize,
										r = (e / this.chunkSize) | 0;
									return this.getter(r)[t];
								}
							}),
							(a.prototype.setDataGetter = function (e) {
								this.getter = e;
							}),
							(a.prototype.cacheLength = function () {
								var e = new XMLHttpRequest();
								if ((e.open('HEAD', r, !1), e.send(null), !((e.status >= 200 && e.status < 300) || 304 === e.status))) throw new Error("Couldn't load " + r + '. Status: ' + e.status);
								var t,
									n = Number(e.getResponseHeader('Content-length')),
									o = (t = e.getResponseHeader('Accept-Ranges')) && 'bytes' === t,
									a = (t = e.getResponseHeader('Content-Encoding')) && 'gzip' === t,
									i = 1048576;
								o || (i = n);
								var u = this;
								u.setDataGetter(function (e) {
									var t = e * i,
										o = (e + 1) * i - 1;
									if (
										((o = Math.min(o, n - 1)),
										void 0 === u.chunks[e] &&
											(u.chunks[e] = (function (e, t) {
												if (e > t) throw new Error('invalid range (' + e + ', ' + t + ') or no bytes requested!');
												if (t > n - 1) throw new Error('only ' + n + ' bytes available! programmer error!');
												var o = new XMLHttpRequest();
												if (
													(o.open('GET', r, !1),
													n !== i && o.setRequestHeader('Range', 'bytes=' + e + '-' + t),
													'undefined' != typeof Uint8Array && (o.responseType = 'arraybuffer'),
													o.overrideMimeType && o.overrideMimeType('text/plain; charset=x-user-defined'),
													o.send(null),
													!((o.status >= 200 && o.status < 300) || 304 === o.status))
												)
													throw new Error("Couldn't load " + r + '. Status: ' + o.status);
												return void 0 !== o.response ? new Uint8Array(o.response || []) : Ur(o.responseText || '', !0);
											})(t, o)),
										void 0 === u.chunks[e])
									)
										throw new Error('doXHR failed!');
									return u.chunks[e];
								}),
									(!a && n) || ((i = n = 1), (n = this.getter(0).length), (i = n), l('LazyFiles on gzip forces download of the whole file when length is accessed')),
									(this._length = n),
									(this._chunkSize = i),
									(this.lengthKnown = !0);
							}),
							'undefined' != typeof XMLHttpRequest)
						)
							throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc';
						var i = { isDevice: !1, url: r },
							u = Me.createFile(e, t, i, n, o);
						i.contents ? (u.contents = i.contents) : i.url && ((u.contents = null), (u.url = i.url)),
							Object.defineProperties(u, {
								usedBytes: {
									get: function () {
										return this.contents.length;
									}
								}
							});
						var s = {};
						return (
							Object.keys(u.stream_ops).forEach(function (e) {
								var t = u.stream_ops[e];
								s[e] = function () {
									return Me.forceLoadFile(u), t.apply(null, arguments);
								};
							}),
							(s.read = function (e, t, r, n, o) {
								Me.forceLoadFile(u);
								var a = e.node.contents;
								if (o >= a.length) return 0;
								var i = Math.min(a.length - o, n);
								if (a.slice) for (var s = 0; s < i; s++) t[r + s] = a[o + s];
								else for (s = 0; s < i; s++) t[r + s] = a.get(o + s);
								return i;
							}),
							(u.stream_ops = s),
							u
						);
					},
					createPreloadedFile: function (t, r, n, o, a, i, u, s, c, l) {
						ir.init();
						var f = r ? Se.resolve(Ce.join2(t, r)) : t;
						function d(n) {
							function d(e) {
								l && l(), s || Me.createDataFile(t, r, e, o, a, c), i && i(), ne();
							}
							var m = !1;
							e.preloadPlugins.forEach(function (e) {
								m ||
									(e.canHandle(f) &&
										(e.handle(n, f, d, function () {
											u && u(), ne();
										}),
										(m = !0)));
							}),
								m || d(n);
						}
						re(),
							'string' == typeof n
								? ir.asyncLoad(
										n,
										function (e) {
											d(e);
										},
										u
								  )
								: d(n);
					},
					indexedDB: function () {
						return window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
					},
					DB_NAME: function () {
						return 'EM_FS_' + window.location.pathname;
					},
					DB_VERSION: 20,
					DB_STORE_NAME: 'FILE_DATA',
					saveFilesToDB: function (e, t, r) {
						(t = t || function () {}), (r = r || function () {});
						var n = Me.indexedDB();
						try {
							var o = n.open(Me.DB_NAME(), Me.DB_VERSION);
						} catch (a) {
							return r(a);
						}
						(o.onupgradeneeded = function () {
							l('creating db'), o.result.createObjectStore(Me.DB_STORE_NAME);
						}),
							(o.onsuccess = function () {
								var n = o.result.transaction([Me.DB_STORE_NAME], 'readwrite'),
									a = n.objectStore(Me.DB_STORE_NAME),
									i = 0,
									u = 0,
									s = e.length;
								function c() {
									0 == u ? t() : r();
								}
								e.forEach(function (e) {
									var t = a.put(Me.analyzePath(e).object.contents, e);
									(t.onsuccess = function () {
										++i + u == s && c();
									}),
										(t.onerror = function () {
											u++, i + u == s && c();
										});
								}),
									(n.onerror = r);
							}),
							(o.onerror = r);
					},
					loadFilesFromDB: function (e, t, r) {
						(t = t || function () {}), (r = r || function () {});
						var n = Me.indexedDB();
						try {
							var o = n.open(Me.DB_NAME(), Me.DB_VERSION);
						} catch (a) {
							return r(a);
						}
						(o.onupgradeneeded = r),
							(o.onsuccess = function () {
								var n = o.result;
								try {
									var i = n.transaction([Me.DB_STORE_NAME], 'readonly');
								} catch (a) {
									return void r(a);
								}
								var u = i.objectStore(Me.DB_STORE_NAME),
									s = 0,
									c = 0,
									l = e.length;
								function f() {
									0 == c ? t() : r();
								}
								e.forEach(function (e) {
									var t = u.get(e);
									(t.onsuccess = function () {
										Me.analyzePath(e).exists && Me.unlink(e), Me.createDataFile(Ce.dirname(e), Ce.basename(e), t.result, !0, !0, !0), ++s + c == l && f();
									}),
										(t.onerror = function () {
											c++, s + c == l && f();
										});
								}),
									(i.onerror = r);
							}),
							(o.onerror = r);
					}
				},
				Ae = {
					mappings: {},
					DEFAULT_POLLMASK: 5,
					umask: 511,
					calculateAt: function (e, t, r) {
						if ('/' === t[0]) return t;
						var n;
						if (-100 === e) n = Me.cwd();
						else {
							var o = Me.getStream(e);
							if (!o) throw new Me.ErrnoError(8);
							n = o.path;
						}
						if (0 == t.length) {
							if (!r) throw new Me.ErrnoError(44);
							return n;
						}
						return Ce.join2(n, t);
					},
					doStat: function (e, t, r) {
						try {
							var n = e(t);
						} catch (o) {
							if (o && o.node && Ce.normalize(t) !== Ce.normalize(Me.getPath(o.node))) return -54;
							throw o;
						}
						return (
							(B[r >> 2] = n.dev),
							(B[(r + 4) >> 2] = 0),
							(B[(r + 8) >> 2] = n.ino),
							(B[(r + 12) >> 2] = n.mode),
							(B[(r + 16) >> 2] = n.nlink),
							(B[(r + 20) >> 2] = n.uid),
							(B[(r + 24) >> 2] = n.gid),
							(B[(r + 28) >> 2] = n.rdev),
							(B[(r + 32) >> 2] = 0),
							(se = [
								n.size >>> 0,
								((ue = n.size),
								+Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
							]),
							(B[(r + 40) >> 2] = se[0]),
							(B[(r + 44) >> 2] = se[1]),
							(B[(r + 48) >> 2] = 4096),
							(B[(r + 52) >> 2] = n.blocks),
							(B[(r + 56) >> 2] = (n.atime.getTime() / 1e3) | 0),
							(B[(r + 60) >> 2] = 0),
							(B[(r + 64) >> 2] = (n.mtime.getTime() / 1e3) | 0),
							(B[(r + 68) >> 2] = 0),
							(B[(r + 72) >> 2] = (n.ctime.getTime() / 1e3) | 0),
							(B[(r + 76) >> 2] = 0),
							(se = [
								n.ino >>> 0,
								((ue = n.ino),
								+Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
							]),
							(B[(r + 80) >> 2] = se[0]),
							(B[(r + 84) >> 2] = se[1]),
							0
						);
					},
					doMsync: function (e, t, r, n, o) {
						var a = L.slice(e, e + r);
						Me.msync(t, a, o, r, n);
					},
					doMkdir: function (e, t) {
						return '/' === (e = Ce.normalize(e))[e.length - 1] && (e = e.substr(0, e.length - 1)), Me.mkdir(e, t, 0), 0;
					},
					doMknod: function (e, t, r) {
						switch (61440 & t) {
							case 32768:
							case 8192:
							case 24576:
							case 4096:
							case 49152:
								break;
							default:
								return -28;
						}
						return Me.mknod(e, t, r), 0;
					},
					doReadlink: function (e, t, r) {
						if (r <= 0) return -28;
						var n = Me.readlink(e),
							o = Math.min(r, P(n)),
							a = A[t + o];
						return D(n, t, r + 1), (A[t + o] = a), o;
					},
					doAccess: function (e, t) {
						if (-8 & t) return -28;
						var r;
						if (!(r = Me.lookupPath(e, { follow: !0 }).node)) return -44;
						var n = '';
						return 4 & t && (n += 'r'), 2 & t && (n += 'w'), 1 & t && (n += 'x'), n && Me.nodePermissions(r, n) ? -2 : 0;
					},
					doDup: function (e, t, r) {
						var n = Me.getStream(r);
						return n && Me.close(n), Me.open(e, t, 0, r, r).fd;
					},
					doReadv: function (e, t, r, n) {
						for (var o = 0, a = 0; a < r; a++) {
							var i = B[(t + 8 * a) >> 2],
								u = B[(t + (8 * a + 4)) >> 2],
								s = Me.read(e, A, i, u, n);
							if (s < 0) return -1;
							if (((o += s), s < u)) break;
						}
						return o;
					},
					doWritev: function (e, t, r, n) {
						for (var o = 0, a = 0; a < r; a++) {
							var i = B[(t + 8 * a) >> 2],
								u = B[(t + (8 * a + 4)) >> 2],
								s = Me.write(e, A, i, u, n);
							if (s < 0) return -1;
							o += s;
						}
						return o;
					},
					varargs: void 0,
					get: function () {
						return (Ae.varargs += 4), B[(Ae.varargs - 4) >> 2];
					},
					getStr: function (e) {
						return S(e);
					},
					getStreamFromFD: function (e) {
						var t = Me.getStream(e);
						if (!t) throw new Me.ErrnoError(8);
						return t;
					},
					get64: function (e, t) {
						return e;
					}
				};
			function Le(e) {
				switch (e) {
					case 1:
						return 0;
					case 2:
						return 1;
					case 4:
						return 2;
					case 8:
						return 3;
					default:
						throw new TypeError('Unknown type size: ' + e);
				}
			}
			var Re = void 0;
			function Ie(e) {
				for (var t = '', r = e; L[r]; ) t += Re[L[r++]];
				return t;
			}
			var Be = {},
				Ue = {},
				Oe = {};
			function Ne(e) {
				if (void 0 === e) return '_unknown';
				var t = (e = e.replace(/[^a-zA-Z0-9_]/g, '$')).charCodeAt(0);
				return t >= 48 && t <= 57 ? '_' + e : e;
			}
			function je(e, t) {
				return (e = Ne(e)), new Function('body', 'return function ' + e + '() {\n    "use strict";    return body.apply(this, arguments);\n};\n')(t);
			}
			function ze(e, t) {
				var r = je(t, function (e) {
					(this.name = t), (this.message = e);
					var r = new Error(e).stack;
					void 0 !== r && (this.stack = this.toString() + '\n' + r.replace(/^Error(:[^\n]*)?\n/, ''));
				});
				return (
					(r.prototype = Object.create(e.prototype)),
					(r.prototype.constructor = r),
					(r.prototype.toString = function () {
						return void 0 === this.message ? this.name : this.name + ': ' + this.message;
					}),
					r
				);
			}
			var We = void 0;
			function Ge(e) {
				throw new We(e);
			}
			var $e = void 0;
			function qe(e) {
				throw new $e(e);
			}
			function Xe(e, t, r) {
				function n(t) {
					var n = r(t);
					n.length !== e.length && qe('Mismatched type converter count');
					for (var o = 0; o < e.length; ++o) Ye(e[o], n[o]);
				}
				e.forEach(function (e) {
					Oe[e] = t;
				});
				var o = new Array(t.length),
					a = [],
					i = 0;
				t.forEach(function (e, t) {
					Ue.hasOwnProperty(e)
						? (o[t] = Ue[e])
						: (a.push(e),
						  Be.hasOwnProperty(e) || (Be[e] = []),
						  Be[e].push(function () {
								(o[t] = Ue[e]), ++i === a.length && n(o);
						  }));
				}),
					0 === a.length && n(o);
			}
			function Ye(e, t, r) {
				if (((r = r || {}), !('argPackAdvance' in t))) throw new TypeError('registerType registeredInstance requires argPackAdvance');
				var n = t.name;
				if ((e || Ge('type "' + n + '" must have a positive integer typeid pointer'), Ue.hasOwnProperty(e))) {
					if (r.ignoreDuplicateRegistrations) return;
					Ge("Cannot register type '" + n + "' twice");
				}
				if (((Ue[e] = t), delete Oe[e], Be.hasOwnProperty(e))) {
					var o = Be[e];
					delete Be[e],
						o.forEach(function (e) {
							e();
						});
				}
			}
			function He(e) {
				if (!(this instanceof ut)) return !1;
				if (!(e instanceof ut)) return !1;
				for (var t = this.$$.ptrType.registeredClass, r = this.$$.ptr, n = e.$$.ptrType.registeredClass, o = e.$$.ptr; t.baseClass; ) (r = t.upcast(r)), (t = t.baseClass);
				for (; n.baseClass; ) (o = n.upcast(o)), (n = n.baseClass);
				return t === n && r === o;
			}
			function Ve(e) {
				Ge(e.$$.ptrType.registeredClass.name + ' instance already deleted');
			}
			var Qe = !1;
			function Ke(e) {}
			function Je(e) {
				(e.count.value -= 1),
					0 === e.count.value &&
						(function (e) {
							e.smartPtr ? e.smartPtrType.rawDestructor(e.smartPtr) : e.ptrType.registeredClass.rawDestructor(e.ptr);
						})(e);
			}
			function Ze(e) {
				return 'undefined' == typeof FinalizationGroup
					? ((Ze = function (e) {
							return e;
					  }),
					  e)
					: ((Qe = new FinalizationGroup(function (e) {
							for (var t = e.next(); !t.done; t = e.next()) {
								var r = t.value;
								r.ptr ? Je(r) : console.warn('object already deleted: ' + r.ptr);
							}
					  })),
					  (Ke = function (e) {
							Qe.unregister(e.$$);
					  }),
					  (Ze = function (e) {
							return Qe.register(e, e.$$, e.$$), e;
					  })(e));
			}
			function et() {
				if ((this.$$.ptr || Ve(this), this.$$.preservePointerOnDelete)) return (this.$$.count.value += 1), this;
				var e,
					t = Ze(
						Object.create(Object.getPrototypeOf(this), {
							$$: {
								value:
									((e = this.$$),
									{
										count: e.count,
										deleteScheduled: e.deleteScheduled,
										preservePointerOnDelete: e.preservePointerOnDelete,
										ptr: e.ptr,
										ptrType: e.ptrType,
										smartPtr: e.smartPtr,
										smartPtrType: e.smartPtrType
									})
							}
						})
					);
				return (t.$$.count.value += 1), (t.$$.deleteScheduled = !1), t;
			}
			function tt() {
				this.$$.ptr || Ve(this),
					this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Ge('Object already scheduled for deletion'),
					Ke(this),
					Je(this.$$),
					this.$$.preservePointerOnDelete || ((this.$$.smartPtr = void 0), (this.$$.ptr = void 0));
			}
			function rt() {
				return !this.$$.ptr;
			}
			var nt = void 0,
				ot = [];
			function at() {
				for (; ot.length; ) {
					var e = ot.pop();
					(e.$$.deleteScheduled = !1), e.delete();
				}
			}
			function it() {
				return (
					this.$$.ptr || Ve(this),
					this.$$.deleteScheduled && !this.$$.preservePointerOnDelete && Ge('Object already scheduled for deletion'),
					ot.push(this),
					1 === ot.length && nt && nt(at),
					(this.$$.deleteScheduled = !0),
					this
				);
			}
			function ut() {}
			var st = {};
			function ct(e, t, r) {
				if (void 0 === e[t].overloadTable) {
					var n = e[t];
					(e[t] = function () {
						return (
							e[t].overloadTable.hasOwnProperty(arguments.length) ||
								Ge("Function '" + r + "' called with an invalid number of arguments (" + arguments.length + ') - expects one of (' + e[t].overloadTable + ')!'),
							e[t].overloadTable[arguments.length].apply(this, arguments)
						);
					}),
						(e[t].overloadTable = []),
						(e[t].overloadTable[n.argCount] = n);
				}
			}
			function lt(t, r, n) {
				e.hasOwnProperty(t)
					? ((void 0 === n || (void 0 !== e[t].overloadTable && void 0 !== e[t].overloadTable[n])) && Ge("Cannot register public name '" + t + "' twice"),
					  ct(e, t, t),
					  e.hasOwnProperty(n) && Ge('Cannot register multiple overloads of a function with the same number of arguments (' + n + ')!'),
					  (e[t].overloadTable[n] = r))
					: ((e[t] = r), void 0 !== n && (e[t].numArguments = n));
			}
			function ft(e, t, r, n, o, a, i, u) {
				(this.name = e),
					(this.constructor = t),
					(this.instancePrototype = r),
					(this.rawDestructor = n),
					(this.baseClass = o),
					(this.getActualType = a),
					(this.upcast = i),
					(this.downcast = u),
					(this.pureVirtualFunctions = []);
			}
			function dt(e, t, r) {
				for (; t !== r; ) t.upcast || Ge('Expected null or instance of ' + r.name + ', got an instance of ' + t.name), (e = t.upcast(e)), (t = t.baseClass);
				return e;
			}
			function mt(e, t) {
				if (null === t) return this.isReference && Ge('null is not a valid ' + this.name), 0;
				t.$$ || Ge('Cannot pass "' + Ht(t) + '" as a ' + this.name), t.$$.ptr || Ge('Cannot pass deleted object as a pointer of type ' + this.name);
				var r = t.$$.ptrType.registeredClass;
				return dt(t.$$.ptr, r, this.registeredClass);
			}
			function pt(e, t) {
				var r;
				if (null === t)
					return this.isReference && Ge('null is not a valid ' + this.name), this.isSmartPointer ? ((r = this.rawConstructor()), null !== e && e.push(this.rawDestructor, r), r) : 0;
				t.$$ || Ge('Cannot pass "' + Ht(t) + '" as a ' + this.name),
					t.$$.ptr || Ge('Cannot pass deleted object as a pointer of type ' + this.name),
					!this.isConst &&
						t.$$.ptrType.isConst &&
						Ge('Cannot convert argument of type ' + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + ' to parameter type ' + this.name);
				var n = t.$$.ptrType.registeredClass;
				if (((r = dt(t.$$.ptr, n, this.registeredClass)), this.isSmartPointer))
					switch ((void 0 === t.$$.smartPtr && Ge('Passing raw pointer to smart pointer is illegal'), this.sharingPolicy)) {
						case 0:
							t.$$.smartPtrType === this
								? (r = t.$$.smartPtr)
								: Ge('Cannot convert argument of type ' + (t.$$.smartPtrType ? t.$$.smartPtrType.name : t.$$.ptrType.name) + ' to parameter type ' + this.name);
							break;
						case 1:
							r = t.$$.smartPtr;
							break;
						case 2:
							if (t.$$.smartPtrType === this) r = t.$$.smartPtr;
							else {
								var o = t.clone();
								(r = this.rawShare(
									r,
									qt(function () {
										o.delete();
									})
								)),
									null !== e && e.push(this.rawDestructor, r);
							}
							break;
						default:
							Ge('Unsupporting sharing policy');
					}
				return r;
			}
			function ht(e, t) {
				if (null === t) return this.isReference && Ge('null is not a valid ' + this.name), 0;
				t.$$ || Ge('Cannot pass "' + Ht(t) + '" as a ' + this.name),
					t.$$.ptr || Ge('Cannot pass deleted object as a pointer of type ' + this.name),
					t.$$.ptrType.isConst && Ge('Cannot convert argument of type ' + t.$$.ptrType.name + ' to parameter type ' + this.name);
				var r = t.$$.ptrType.registeredClass;
				return dt(t.$$.ptr, r, this.registeredClass);
			}
			function vt(e) {
				return this.fromWireType(U[e >> 2]);
			}
			function gt(e) {
				return this.rawGetPointee && (e = this.rawGetPointee(e)), e;
			}
			function wt(e) {
				this.rawDestructor && this.rawDestructor(e);
			}
			function yt(e) {
				null !== e && e.delete();
			}
			function bt(e, t, r) {
				if (t === r) return e;
				if (void 0 === r.baseClass) return null;
				var n = bt(e, t, r.baseClass);
				return null === n ? null : r.downcast(n);
			}
			function _t() {
				return Object.keys(Ft).length;
			}
			function Et() {
				var e = [];
				for (var t in Ft) Ft.hasOwnProperty(t) && e.push(Ft[t]);
				return e;
			}
			function kt(e) {
				(nt = e), ot.length && nt && nt(at);
			}
			var Ft = {};
			function Ct(e, t) {
				return (
					(t = (function (e, t) {
						for (void 0 === t && Ge('ptr should not be undefined'); e.baseClass; ) (t = e.upcast(t)), (e = e.baseClass);
						return t;
					})(e, t)),
					Ft[t]
				);
			}
			function xt(e, t) {
				return (
					(t.ptrType && t.ptr) || qe('makeClassHandle requires ptr and ptrType'),
					!!t.smartPtrType != !!t.smartPtr && qe('Both smartPtrType and smartPtr must be specified'),
					(t.count = { value: 1 }),
					Ze(Object.create(e, { $$: { value: t } }))
				);
			}
			function St(e) {
				var t = this.getPointee(e);
				if (!t) return this.destructor(e), null;
				var r = Ct(this.registeredClass, t);
				if (void 0 !== r) {
					if (0 === r.$$.count.value) return (r.$$.ptr = t), (r.$$.smartPtr = e), r.clone();
					var n = r.clone();
					return this.destructor(e), n;
				}
				function o() {
					return this.isSmartPointer
						? xt(this.registeredClass.instancePrototype, { ptrType: this.pointeeType, ptr: t, smartPtrType: this, smartPtr: e })
						: xt(this.registeredClass.instancePrototype, { ptrType: this, ptr: e });
				}
				var a,
					i = this.registeredClass.getActualType(t),
					u = st[i];
				if (!u) return o.call(this);
				a = this.isConst ? u.constPointerType : u.pointerType;
				var s = bt(t, this.registeredClass, a.registeredClass);
				return null === s
					? o.call(this)
					: this.isSmartPointer
					? xt(a.registeredClass.instancePrototype, { ptrType: a, ptr: s, smartPtrType: this, smartPtr: e })
					: xt(a.registeredClass.instancePrototype, { ptrType: a, ptr: s });
			}
			function Tt(e, t, r, n, o, a, i, u, s, c, l) {
				(this.name = e),
					(this.registeredClass = t),
					(this.isReference = r),
					(this.isConst = n),
					(this.isSmartPointer = o),
					(this.pointeeType = a),
					(this.sharingPolicy = i),
					(this.rawGetPointee = u),
					(this.rawConstructor = s),
					(this.rawShare = c),
					(this.rawDestructor = l),
					o || void 0 !== t.baseClass ? (this.toWireType = pt) : n ? ((this.toWireType = mt), (this.destructorFunction = null)) : ((this.toWireType = ht), (this.destructorFunction = null));
			}
			function Dt(t, r, n) {
				e.hasOwnProperty(t) || qe('Replacing nonexistant public symbol'), void 0 !== e[t].overloadTable && void 0 !== n ? (e[t].overloadTable[n] = r) : ((e[t] = r), (e[t].argCount = n));
			}
			function Pt(t, r, n) {
				return t.includes('j')
					? (function (t, r, n) {
							var o = e['dynCall_' + t];
							return n && n.length ? o.apply(null, [r].concat(n)) : o.call(null, r);
					  })(t, r, n)
					: j.get(r).apply(null, n);
			}
			function Mt(e, t) {
				var r,
					n,
					o,
					a = (e = Ie(e)).includes('j')
						? ((r = e),
						  (n = t),
						  (o = []),
						  function () {
								o.length = arguments.length;
								for (var e = 0; e < arguments.length; e++) o[e] = arguments[e];
								return Pt(r, n, o);
						  })
						: j.get(t);
				return 'function' != typeof a && Ge('unknown function pointer with signature ' + e + ': ' + t), a;
			}
			var At = void 0;
			function Lt(e) {
				var t = Gr(e),
					r = Ie(t);
				return zr(t), r;
			}
			function Rt(e, t) {
				var r = [],
					n = {};
				throw (
					(t.forEach(function e(t) {
						n[t] || Ue[t] || (Oe[t] ? Oe[t].forEach(e) : (r.push(t), (n[t] = !0)));
					}),
					new At(e + ': ' + r.map(Lt).join([', '])))
				);
			}
			function It(e, t) {
				if (!(e instanceof Function)) throw new TypeError('new_ called with constructor type ' + typeof e + ' which is not a function');
				var r = je(e.name || 'unknownFunctionName', function () {});
				r.prototype = e.prototype;
				var n = new r(),
					o = e.apply(n, t);
				return o instanceof Object ? o : n;
			}
			function Bt(e) {
				for (; e.length; ) {
					var t = e.pop();
					e.pop()(t);
				}
			}
			function Ut(e, t, r, n, o) {
				var a = t.length;
				a < 2 && Ge("argTypes array size mismatch! Must at least get return value and 'this' types!");
				for (var i = null !== t[1] && null !== r, u = !1, s = 1; s < t.length; ++s)
					if (null !== t[s] && void 0 === t[s].destructorFunction) {
						u = !0;
						break;
					}
				var c = 'void' !== t[0].name,
					l = '',
					f = '';
				for (s = 0; s < a - 2; ++s) (l += (0 !== s ? ', ' : '') + 'arg' + s), (f += (0 !== s ? ', ' : '') + 'arg' + s + 'Wired');
				var d =
					'return function ' +
					Ne(e) +
					'(' +
					l +
					') {\nif (arguments.length !== ' +
					(a - 2) +
					") {\nthrowBindingError('function " +
					e +
					" called with ' + arguments.length + ' arguments, expected " +
					(a - 2) +
					" args!');\n}\n";
				u && (d += 'var destructors = [];\n');
				var m = u ? 'destructors' : 'null',
					p = ['throwBindingError', 'invoker', 'fn', 'runDestructors', 'retType', 'classParam'],
					h = [Ge, n, o, Bt, t[0], t[1]];
				for (i && (d += 'var thisWired = classParam.toWireType(' + m + ', this);\n'), s = 0; s < a - 2; ++s)
					(d += 'var arg' + s + 'Wired = argType' + s + '.toWireType(' + m + ', arg' + s + '); // ' + t[s + 2].name + '\n'), p.push('argType' + s), h.push(t[s + 2]);
				if ((i && (f = 'thisWired' + (f.length > 0 ? ', ' : '') + f), (d += (c ? 'var rv = ' : '') + 'invoker(fn' + (f.length > 0 ? ', ' : '') + f + ');\n'), u))
					d += 'runDestructors(destructors);\n';
				else
					for (s = i ? 1 : 2; s < t.length; ++s) {
						var v = 1 === s ? 'thisWired' : 'arg' + (s - 2) + 'Wired';
						null !== t[s].destructorFunction && ((d += v + '_dtor(' + v + '); // ' + t[s].name + '\n'), p.push(v + '_dtor'), h.push(t[s].destructorFunction));
					}
				return c && (d += 'var ret = retType.fromWireType(rv);\nreturn ret;\n'), (d += '}\n'), p.push(d), It(Function, p).apply(null, h);
			}
			function Ot(e, t) {
				for (var r = [], n = 0; n < e; n++) r.push(B[(t >> 2) + n]);
				return r;
			}
			function Nt(e, t, r) {
				return (
					e instanceof Object || Ge(r + ' with invalid "this": ' + e),
					e instanceof t.registeredClass.constructor || Ge(r + ' incompatible with "this" of type ' + e.constructor.name),
					e.$$.ptr || Ge('cannot call emscripten binding method ' + r + ' on deleted object'),
					dt(e.$$.ptr, e.$$.ptrType.registeredClass, t.registeredClass)
				);
			}
			var jt = [],
				zt = [{}, { value: void 0 }, { value: null }, { value: !0 }, { value: !1 }];
			function Wt(e) {
				e > 4 && 0 == --zt[e].refcount && ((zt[e] = void 0), jt.push(e));
			}
			function Gt() {
				for (var e = 0, t = 5; t < zt.length; ++t) void 0 !== zt[t] && ++e;
				return e;
			}
			function $t() {
				for (var e = 5; e < zt.length; ++e) if (void 0 !== zt[e]) return zt[e];
				return null;
			}
			function qt(e) {
				switch (e) {
					case void 0:
						return 1;
					case null:
						return 2;
					case !0:
						return 3;
					case !1:
						return 4;
					default:
						var t = jt.length ? jt.pop() : zt.length;
						return (zt[t] = { refcount: 1, value: e }), t;
				}
			}
			function Xt(e, t, r) {
				switch (t) {
					case 0:
						return function (e) {
							var t = r ? A : L;
							return this.fromWireType(t[e]);
						};
					case 1:
						return function (e) {
							var t = r ? R : I;
							return this.fromWireType(t[e >> 1]);
						};
					case 2:
						return function (e) {
							var t = r ? B : U;
							return this.fromWireType(t[e >> 2]);
						};
					default:
						throw new TypeError('Unknown integer type: ' + e);
				}
			}
			function Yt(e, t) {
				var r = Ue[e];
				return void 0 === r && Ge(t + ' has unknown type ' + Lt(e)), r;
			}
			function Ht(e) {
				if (null === e) return 'null';
				var t = typeof e;
				return 'object' === t || 'array' === t || 'function' === t ? e.toString() : '' + e;
			}
			function Vt(e, t) {
				switch (t) {
					case 2:
						return function (e) {
							return this.fromWireType(O[e >> 2]);
						};
					case 3:
						return function (e) {
							return this.fromWireType(N[e >> 3]);
						};
					default:
						throw new TypeError('Unknown float type: ' + e);
				}
			}
			function Qt(e, t, r) {
				switch (t) {
					case 0:
						return r
							? function (e) {
									return A[e];
							  }
							: function (e) {
									return L[e];
							  };
					case 1:
						return r
							? function (e) {
									return R[e >> 1];
							  }
							: function (e) {
									return I[e >> 1];
							  };
					case 2:
						return r
							? function (e) {
									return B[e >> 2];
							  }
							: function (e) {
									return U[e >> 2];
							  };
					default:
						throw new TypeError('Unknown integer type: ' + e);
				}
			}
			function Kt(e) {
				return e || Ge('Cannot use deleted val. handle = ' + e), zt[e].value;
			}
			function Jt(e, t) {
				for (var r = new Array(e), n = 0; n < e; ++n) r[n] = Yt(B[(t >> 2) + n], 'parameter ' + n);
				return r;
			}
			var Zt = {};
			function er(e) {
				var t = Zt[e];
				return void 0 === t ? Ie(e) : t;
			}
			var tr = [];
			function rr(e, t) {
				if (((ir.mainLoop.timingMode = e), (ir.mainLoop.timingValue = t), !ir.mainLoop.func)) return 1;
				if ((ir.mainLoop.running || (ir.mainLoop.running = !0), 0 == e))
					(ir.mainLoop.scheduler = function () {
						var e = 0 | Math.max(0, ir.mainLoop.tickStartTime + t - ce());
						setTimeout(ir.mainLoop.runner, e);
					}),
						(ir.mainLoop.method = 'timeout');
				else if (1 == e)
					(ir.mainLoop.scheduler = function () {
						ir.requestAnimationFrame(ir.mainLoop.runner);
					}),
						(ir.mainLoop.method = 'rAF');
				else if (2 == e) {
					if ('undefined' == typeof setImmediate) {
						var r = [],
							n = 'setimmediate';
						addEventListener(
							'message',
							function (e) {
								(e.data !== n && e.data.target !== n) || (e.stopPropagation(), r.shift()());
							},
							!0
						),
							(setImmediate = function (e) {
								r.push(e), postMessage(n, '*');
							});
					}
					(ir.mainLoop.scheduler = function () {
						setImmediate(ir.mainLoop.runner);
					}),
						(ir.mainLoop.method = 'immediate');
				}
				return 0;
			}
			function nr(t) {
				!(function (t, r) {
					(_ = t), (r && me() && 0 === t) || (me() || (e.onExit && e.onExit(t), (E = !0)), s(t, new Zr(t)));
				})(t);
			}
			function or(e, t, r, n, o) {
				k(
					!ir.mainLoop.func,
					'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.'
				),
					(ir.mainLoop.func = e),
					(ir.mainLoop.arg = n);
				var a = ir.mainLoop.currentlyRunningMainloop;
				function i() {
					return !(
						a < ir.mainLoop.currentlyRunningMainloop &&
						((function () {
							if (!me())
								try {
									nr(_);
								} catch (e) {
									if (e instanceof Zr) return;
									throw e;
								}
						})(),
						1)
					);
				}
				if (
					((ir.mainLoop.running = !1),
					(ir.mainLoop.runner = function () {
						if (!E)
							if (ir.mainLoop.queue.length > 0) {
								var t = Date.now(),
									r = ir.mainLoop.queue.shift();
								if ((r.func(r.arg), ir.mainLoop.remainingBlockers)) {
									var n = ir.mainLoop.remainingBlockers,
										o = n % 1 == 0 ? n - 1 : Math.floor(n);
									r.counted ? (ir.mainLoop.remainingBlockers = o) : ((o += 0.5), (ir.mainLoop.remainingBlockers = (8 * n + o) / 9));
								}
								if ((console.log('main loop blocker "' + r.name + '" took ' + (Date.now() - t) + ' ms'), ir.mainLoop.updateStatus(), !i())) return;
								setTimeout(ir.mainLoop.runner, 0);
							} else
								i() &&
									((ir.mainLoop.currentFrameNumber = (ir.mainLoop.currentFrameNumber + 1) | 0),
									1 == ir.mainLoop.timingMode && ir.mainLoop.timingValue > 1 && ir.mainLoop.currentFrameNumber % ir.mainLoop.timingValue != 0
										? ir.mainLoop.scheduler()
										: (0 == ir.mainLoop.timingMode && (ir.mainLoop.tickStartTime = ce()),
										  ir.mainLoop.runIter(e),
										  i() && ('object' == typeof SDL && SDL.audio && SDL.audio.queueNewAudioData && SDL.audio.queueNewAudioData(), ir.mainLoop.scheduler())));
					}),
					o || (t && t > 0 ? rr(0, 1e3 / t) : rr(1, 1), ir.mainLoop.scheduler()),
					r)
				)
					throw 'unwind';
			}
			function ar(e, t) {
				if (!E)
					if (t) e();
					else
						try {
							e();
						} catch (r) {
							if (r instanceof Zr) return;
							if ('unwind' !== r) throw (r && 'object' == typeof r && r.stack && f('exception thrown: ' + [r, r.stack]), r);
						}
			}
			var ir = {
					mainLoop: {
						running: !1,
						scheduler: null,
						method: '',
						currentlyRunningMainloop: 0,
						func: null,
						arg: 0,
						timingMode: 0,
						timingValue: 0,
						currentFrameNumber: 0,
						queue: [],
						pause: function () {
							(ir.mainLoop.scheduler = null), ir.mainLoop.currentlyRunningMainloop++;
						},
						resume: function () {
							ir.mainLoop.currentlyRunningMainloop++;
							var e = ir.mainLoop.timingMode,
								t = ir.mainLoop.timingValue,
								r = ir.mainLoop.func;
							(ir.mainLoop.func = null), or(r, 0, !1, ir.mainLoop.arg, !0), rr(e, t), ir.mainLoop.scheduler();
						},
						updateStatus: function () {
							if (e.setStatus) {
								var t = e.statusMessage || 'Please wait...',
									r = ir.mainLoop.remainingBlockers,
									n = ir.mainLoop.expectedBlockers;
								r ? (r < n ? e.setStatus(t + ' (' + (n - r) + '/' + n + ')') : e.setStatus(t)) : e.setStatus('');
							}
						},
						runIter: function (t) {
							if (!E) {
								if (e.preMainLoop && !1 === e.preMainLoop()) return;
								ar(t), e.postMainLoop && e.postMainLoop();
							}
						}
					},
					isFullscreen: !1,
					pointerLock: !1,
					moduleContextCreatedCallbacks: [],
					workers: [],
					init: function () {
						if ((e.preloadPlugins || (e.preloadPlugins = []), !ir.initted)) {
							ir.initted = !0;
							try {
								new Blob(), (ir.hasBlobConstructor = !0);
							} catch (a) {
								(ir.hasBlobConstructor = !1), console.log('warning: no blob constructor, cannot create blobs with mimetypes');
							}
							(ir.BlobBuilder =
								'undefined' != typeof MozBlobBuilder
									? MozBlobBuilder
									: 'undefined' != typeof WebKitBlobBuilder
									? WebKitBlobBuilder
									: ir.hasBlobConstructor
									? null
									: console.log('warning: no BlobBuilder')),
								(ir.URLObject = 'undefined' != typeof window ? (window.URL ? window.URL : window.webkitURL) : void 0),
								e.noImageDecoding ||
									void 0 !== ir.URLObject ||
									(console.log('warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available.'), (e.noImageDecoding = !0));
							var t = {
								canHandle: function (t) {
									return !e.noImageDecoding && /\.(jpg|jpeg|png|bmp)$/i.test(t);
								},
								handle: function (t, r, n, o) {
									var i = null;
									if (ir.hasBlobConstructor)
										try {
											(i = new Blob([t], { type: ir.getMimetype(r) })).size !== t.length && (i = new Blob([new Uint8Array(t).buffer], { type: ir.getMimetype(r) }));
										} catch (a) {
											d('Blob constructor present but fails: ' + a + '; falling back to blob builder');
										}
									if (!i) {
										var u = new ir.BlobBuilder();
										u.append(new Uint8Array(t).buffer), (i = u.getBlob());
									}
									var s = ir.URLObject.createObjectURL(i),
										c = new Image();
									(c.onload = function () {
										k(c.complete, 'Image ' + r + ' could not be decoded');
										var o = document.createElement('canvas');
										(o.width = c.width), (o.height = c.height), o.getContext('2d').drawImage(c, 0, 0), (e.preloadedImages[r] = o), ir.URLObject.revokeObjectURL(s), n && n(t);
									}),
										(c.onerror = function (e) {
											console.log('Image ' + s + ' could not be decoded'), o && o();
										}),
										(c.src = s);
								}
							};
							e.preloadPlugins.push(t);
							var r = {
								canHandle: function (t) {
									return !e.noAudioDecoding && t.substr(-4) in { '.ogg': 1, '.wav': 1, '.mp3': 1 };
								},
								handle: function (t, r, n, o) {
									var i = !1;
									function u(o) {
										i || ((i = !0), (e.preloadedAudios[r] = o), n && n(t));
									}
									function s() {
										i || ((i = !0), (e.preloadedAudios[r] = new Audio()), o && o());
									}
									if (!ir.hasBlobConstructor) return s();
									try {
										var c = new Blob([t], { type: ir.getMimetype(r) });
									} catch (a) {
										return s();
									}
									var l = ir.URLObject.createObjectURL(c),
										f = new Audio();
									f.addEventListener(
										'canplaythrough',
										function () {
											u(f);
										},
										!1
									),
										(f.onerror = function (e) {
											i ||
												(console.log('warning: browser could not fully decode audio ' + r + ', trying slower base64 approach'),
												(f.src =
													'data:audio/x-' +
													r.substr(-3) +
													';base64,' +
													(function (e) {
														for (var t = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', r = '', n = 0, o = 0, a = 0; a < e.length; a++)
															for (n = (n << 8) | e[a], o += 8; o >= 6; ) {
																var i = (n >> (o - 6)) & 63;
																(o -= 6), (r += t[i]);
															}
														return 2 == o ? ((r += t[(3 & n) << 4]), (r += '==')) : 4 == o && ((r += t[(15 & n) << 2]), (r += '=')), r;
													})(t)),
												u(f));
										}),
										(f.src = l),
										ir.safeSetTimeout(function () {
											u(f);
										}, 1e4);
								}
							};
							e.preloadPlugins.push(r);
							var n = e.canvas;
							n &&
								((n.requestPointerLock = n.requestPointerLock || n.mozRequestPointerLock || n.webkitRequestPointerLock || n.msRequestPointerLock || function () {}),
								(n.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock || document.msExitPointerLock || function () {}),
								(n.exitPointerLock = n.exitPointerLock.bind(document)),
								document.addEventListener('pointerlockchange', o, !1),
								document.addEventListener('mozpointerlockchange', o, !1),
								document.addEventListener('webkitpointerlockchange', o, !1),
								document.addEventListener('mspointerlockchange', o, !1),
								e.elementPointerLock &&
									n.addEventListener(
										'click',
										function (t) {
											!ir.pointerLock && e.canvas.requestPointerLock && (e.canvas.requestPointerLock(), t.preventDefault());
										},
										!1
									));
						}
						function o() {
							ir.pointerLock =
								document.pointerLockElement === e.canvas ||
								document.mozPointerLockElement === e.canvas ||
								document.webkitPointerLockElement === e.canvas ||
								document.msPointerLockElement === e.canvas;
						}
					},
					createContext: function (t, r, n, o) {
						if (r && e.ctx && t == e.canvas) return e.ctx;
						var a, i;
						if (r) {
							var u = { antialias: !1, alpha: !1, majorVersion: 'undefined' != typeof WebGL2RenderingContext ? 2 : 1 };
							if (o) for (var s in o) u[s] = o[s];
							void 0 !== dr && (i = dr.createContext(t, u)) && (a = dr.getContext(i).GLctx);
						} else a = t.getContext('2d');
						return a
							? (n &&
									(r || k(void 0 === Mr, 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it'),
									(e.ctx = a),
									r && dr.makeContextCurrent(i),
									(e.useWebGL = r),
									ir.moduleContextCreatedCallbacks.forEach(function (e) {
										e();
									}),
									ir.init()),
							  a)
							: null;
					},
					destroyContext: function (e, t, r) {},
					fullscreenHandlersInstalled: !1,
					lockPointer: void 0,
					resizeCanvas: void 0,
					requestFullscreen: function (t, r) {
						(ir.lockPointer = t), (ir.resizeCanvas = r), void 0 === ir.lockPointer && (ir.lockPointer = !0), void 0 === ir.resizeCanvas && (ir.resizeCanvas = !1);
						var n = e.canvas;
						function o() {
							ir.isFullscreen = !1;
							var t = n.parentNode;
							(document.fullscreenElement ||
								document.mozFullScreenElement ||
								document.msFullscreenElement ||
								document.webkitFullscreenElement ||
								document.webkitCurrentFullScreenElement) === t
								? ((n.exitFullscreen = ir.exitFullscreen),
								  ir.lockPointer && n.requestPointerLock(),
								  (ir.isFullscreen = !0),
								  ir.resizeCanvas ? ir.setFullscreenCanvasSize() : ir.updateCanvasDimensions(n))
								: (t.parentNode.insertBefore(n, t), t.parentNode.removeChild(t), ir.resizeCanvas ? ir.setWindowedCanvasSize() : ir.updateCanvasDimensions(n)),
								e.onFullScreen && e.onFullScreen(ir.isFullscreen),
								e.onFullscreen && e.onFullscreen(ir.isFullscreen);
						}
						ir.fullscreenHandlersInstalled ||
							((ir.fullscreenHandlersInstalled = !0),
							document.addEventListener('fullscreenchange', o, !1),
							document.addEventListener('mozfullscreenchange', o, !1),
							document.addEventListener('webkitfullscreenchange', o, !1),
							document.addEventListener('MSFullscreenChange', o, !1));
						var a = document.createElement('div');
						n.parentNode.insertBefore(a, n),
							a.appendChild(n),
							(a.requestFullscreen =
								a.requestFullscreen ||
								a.mozRequestFullScreen ||
								a.msRequestFullscreen ||
								(a.webkitRequestFullscreen
									? function () {
											a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
									  }
									: null) ||
								(a.webkitRequestFullScreen
									? function () {
											a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
									  }
									: null)),
							a.requestFullscreen();
					},
					exitFullscreen: function () {
						return (
							!!ir.isFullscreen &&
							((
								document.exitFullscreen ||
								document.cancelFullScreen ||
								document.mozCancelFullScreen ||
								document.msExitFullscreen ||
								document.webkitCancelFullScreen ||
								function () {}
							).apply(document, []),
							!0)
						);
					},
					nextRAF: 0,
					fakeRequestAnimationFrame: function (e) {
						var t = Date.now();
						if (0 === ir.nextRAF) ir.nextRAF = t + 1e3 / 60;
						else for (; t + 2 >= ir.nextRAF; ) ir.nextRAF += 1e3 / 60;
						var r = Math.max(ir.nextRAF - t, 0);
						setTimeout(e, r);
					},
					requestAnimationFrame: function (e) {
						'function' != typeof requestAnimationFrame ? (0, ir.fakeRequestAnimationFrame)(e) : requestAnimationFrame(e);
					},
					safeRequestAnimationFrame: function (e) {
						return ir.requestAnimationFrame(function () {
							ar(e);
						});
					},
					safeSetTimeout: function (e, t) {
						return setTimeout(function () {
							ar(e);
						}, t);
					},
					getMimetype: function (e) {
						return { jpg: 'image/jpeg', jpeg: 'image/jpeg', png: 'image/png', bmp: 'image/bmp', ogg: 'audio/ogg', wav: 'audio/wav', mp3: 'audio/mpeg' }[e.substr(e.lastIndexOf('.') + 1)];
					},
					getUserMedia: function (e) {
						window.getUserMedia || (window.getUserMedia = navigator.getUserMedia || navigator.mozGetUserMedia), window.getUserMedia(e);
					},
					getMovementX: function (e) {
						return e.movementX || e.mozMovementX || e.webkitMovementX || 0;
					},
					getMovementY: function (e) {
						return e.movementY || e.mozMovementY || e.webkitMovementY || 0;
					},
					getMouseWheelDelta: function (e) {
						var t = 0;
						switch (e.type) {
							case 'DOMMouseScroll':
								t = e.detail / 3;
								break;
							case 'mousewheel':
								t = e.wheelDelta / 120;
								break;
							case 'wheel':
								switch (((t = e.deltaY), e.deltaMode)) {
									case 0:
										t /= 100;
										break;
									case 1:
										t /= 3;
										break;
									case 2:
										t *= 80;
										break;
									default:
										throw 'unrecognized mouse wheel delta mode: ' + e.deltaMode;
								}
								break;
							default:
								throw 'unrecognized mouse wheel event: ' + e.type;
						}
						return t;
					},
					mouseX: 0,
					mouseY: 0,
					mouseMovementX: 0,
					mouseMovementY: 0,
					touches: {},
					lastTouches: {},
					calculateMouseEvent: function (t) {
						if (ir.pointerLock)
							'mousemove' != t.type && 'mozMovementX' in t
								? (ir.mouseMovementX = ir.mouseMovementY = 0)
								: ((ir.mouseMovementX = ir.getMovementX(t)), (ir.mouseMovementY = ir.getMovementY(t))),
								'undefined' != typeof SDL
									? ((ir.mouseX = SDL.mouseX + ir.mouseMovementX), (ir.mouseY = SDL.mouseY + ir.mouseMovementY))
									: ((ir.mouseX += ir.mouseMovementX), (ir.mouseY += ir.mouseMovementY));
						else {
							var r = e.canvas.getBoundingClientRect(),
								n = e.canvas.width,
								o = e.canvas.height,
								a = void 0 !== window.scrollX ? window.scrollX : window.pageXOffset,
								i = void 0 !== window.scrollY ? window.scrollY : window.pageYOffset;
							if ('touchstart' === t.type || 'touchend' === t.type || 'touchmove' === t.type) {
								var u = t.touch;
								if (void 0 === u) return;
								var s = u.pageX - (a + r.left),
									c = u.pageY - (i + r.top),
									l = { x: (s *= n / r.width), y: (c *= o / r.height) };
								if ('touchstart' === t.type) (ir.lastTouches[u.identifier] = l), (ir.touches[u.identifier] = l);
								else if ('touchend' === t.type || 'touchmove' === t.type) {
									var f = ir.touches[u.identifier];
									f || (f = l), (ir.lastTouches[u.identifier] = f), (ir.touches[u.identifier] = l);
								}
								return;
							}
							var d = t.pageX - (a + r.left),
								m = t.pageY - (i + r.top);
							(d *= n / r.width), (m *= o / r.height), (ir.mouseMovementX = d - ir.mouseX), (ir.mouseMovementY = m - ir.mouseY), (ir.mouseX = d), (ir.mouseY = m);
						}
					},
					asyncLoad: function (e, t, r, n) {
						var o = n ? '' : 'al ' + e;
						i(
							e,
							function (r) {
								k(r, 'Loading data file "' + e + '" failed (no arrayBuffer).'), t(new Uint8Array(r)), o && ne();
							},
							function (t) {
								if (!r) throw 'Loading data file "' + e + '" failed.';
								r();
							}
						),
							o && re();
					},
					resizeListeners: [],
					updateResizeListeners: function () {
						var t = e.canvas;
						ir.resizeListeners.forEach(function (e) {
							e(t.width, t.height);
						});
					},
					setCanvasSize: function (t, r, n) {
						var o = e.canvas;
						ir.updateCanvasDimensions(o, t, r), n || ir.updateResizeListeners();
					},
					windowedWidth: 0,
					windowedHeight: 0,
					setFullscreenCanvasSize: function () {
						if ('undefined' != typeof SDL) {
							var t = U[SDL.screen >> 2];
							(t |= 8388608), (B[SDL.screen >> 2] = t);
						}
						ir.updateCanvasDimensions(e.canvas), ir.updateResizeListeners();
					},
					setWindowedCanvasSize: function () {
						if ('undefined' != typeof SDL) {
							var t = U[SDL.screen >> 2];
							(t &= -8388609), (B[SDL.screen >> 2] = t);
						}
						ir.updateCanvasDimensions(e.canvas), ir.updateResizeListeners();
					},
					updateCanvasDimensions: function (t, r, n) {
						r && n ? ((t.widthNative = r), (t.heightNative = n)) : ((r = t.widthNative), (n = t.heightNative));
						var o = r,
							a = n;
						if (
							(e.forcedAspectRatio && e.forcedAspectRatio > 0 && (o / a < e.forcedAspectRatio ? (o = Math.round(a * e.forcedAspectRatio)) : (a = Math.round(o / e.forcedAspectRatio))),
							(document.fullscreenElement ||
								document.mozFullScreenElement ||
								document.msFullscreenElement ||
								document.webkitFullscreenElement ||
								document.webkitCurrentFullScreenElement) === t.parentNode && 'undefined' != typeof screen)
						) {
							var i = Math.min(screen.width / o, screen.height / a);
							(o = Math.round(o * i)), (a = Math.round(a * i));
						}
						ir.resizeCanvas
							? (t.width != o && (t.width = o), t.height != a && (t.height = a), void 0 !== t.style && (t.style.removeProperty('width'), t.style.removeProperty('height')))
							: (t.width != r && (t.width = r),
							  t.height != n && (t.height = n),
							  void 0 !== t.style &&
									(o != r || a != n
										? (t.style.setProperty('width', o + 'px', 'important'), t.style.setProperty('height', a + 'px', 'important'))
										: (t.style.removeProperty('width'), t.style.removeProperty('height'))));
					},
					wgetRequests: {},
					nextWgetRequestHandle: 0,
					getNextWgetRequestHandle: function () {
						var e = ir.nextWgetRequestHandle;
						return ir.nextWgetRequestHandle++, e;
					}
				},
				ur = {
					QUEUE_INTERVAL: 25,
					QUEUE_LOOKAHEAD: 0.1,
					DEVICE_NAME: 'Emscripten OpenAL',
					CAPTURE_DEVICE_NAME: 'Emscripten OpenAL capture',
					ALC_EXTENSIONS: { ALC_SOFT_pause_device: !0, ALC_SOFT_HRTF: !0 },
					AL_EXTENSIONS: { AL_EXT_float32: !0, AL_SOFT_loop_points: !0, AL_SOFT_source_length: !0, AL_EXT_source_distance_model: !0, AL_SOFT_source_spatialize: !0 },
					_alcErr: 0,
					alcErr: 0,
					deviceRefCounts: {},
					alcStringCache: {},
					paused: !1,
					stringCache: {},
					contexts: {},
					currentCtx: null,
					buffers: { 0: { id: 0, refCount: 0, audioBuf: null, frequency: 0, bytesPerSample: 2, channels: 1, length: 0 } },
					paramArray: [],
					_nextId: 1,
					newId: function () {
						return ur.freeIds.length > 0 ? ur.freeIds.pop() : ur._nextId++;
					},
					freeIds: [],
					scheduleContextAudio: function (e) {
						if (1 !== ir.mainLoop.timingMode || 'visible' == document.visibilityState) for (var t in e.sources) ur.scheduleSourceAudio(e.sources[t]);
					},
					scheduleSourceAudio: function (e, t) {
						if ((1 !== ir.mainLoop.timingMode || 'visible' == document.visibilityState) && 4114 === e.state) {
							for (var r = ur.updateSourceTime(e), n = e.bufStartTime, o = e.bufOffset, a = e.bufsProcessed, i = 0; i < e.audioQueue.length; i++)
								(n = (l = e.audioQueue[i])._startTime + l._duration), (o = 0), (a += l._skipCount + 1);
							t || (t = ur.QUEUE_LOOKAHEAD);
							for (var u = r + t, s = 0; n < u; ) {
								if (a >= e.bufQueue.length) {
									if (!e.looping) break;
									a %= e.bufQueue.length;
								}
								var c = e.bufQueue[a % e.bufQueue.length];
								if (0 === c.length) {
									if (++s === e.bufQueue.length) break;
								} else {
									var l;
									((l = e.context.audioCtx.createBufferSource()).buffer = c.audioBuf),
										(l.playbackRate.value = e.playbackRate),
										(c.audioBuf._loopStart || c.audioBuf._loopEnd) && ((l.loopStart = c.audioBuf._loopStart), (l.loopEnd = c.audioBuf._loopEnd));
									var f = 0;
									4136 === e.type && e.looping
										? ((f = Number.POSITIVE_INFINITY),
										  (l.loop = !0),
										  c.audioBuf._loopStart && (l.loopStart = c.audioBuf._loopStart),
										  c.audioBuf._loopEnd && (l.loopEnd = c.audioBuf._loopEnd))
										: (f = (c.audioBuf.duration - o) / e.playbackRate),
										(l._startOffset = o),
										(l._duration = f),
										(l._skipCount = s),
										(s = 0),
										l.connect(e.gain),
										void 0 !== l.start
											? ((n = Math.max(n, e.context.audioCtx.currentTime)), l.start(n, o))
											: void 0 !== l.noteOn && ((n = Math.max(n, e.context.audioCtx.currentTime)), l.noteOn(n)),
										(l._startTime = n),
										e.audioQueue.push(l),
										(n += f);
								}
								(o = 0), a++;
							}
						}
					},
					updateSourceTime: function (e) {
						var t = e.context.audioCtx.currentTime;
						if (4114 !== e.state) return t;
						isFinite(e.bufStartTime) || ((e.bufStartTime = t - e.bufOffset / e.playbackRate), (e.bufOffset = 0));
						for (var r = 0; e.audioQueue.length; ) {
							var n = e.audioQueue[0];
							if (((e.bufsProcessed += n._skipCount), t < (r = n._startTime + n._duration))) break;
							e.audioQueue.shift(), (e.bufStartTime = r), (e.bufOffset = 0), e.bufsProcessed++;
						}
						if (e.bufsProcessed >= e.bufQueue.length && !e.looping) ur.setSourceState(e, 4116);
						else if (4136 === e.type && e.looping)
							if (0 === (c = e.bufQueue[0]).length) e.bufOffset = 0;
							else {
								var o = (t - e.bufStartTime) * e.playbackRate,
									a = c.audioBuf._loopStart || 0,
									i = c.audioBuf._loopEnd || c.audioBuf.duration;
								i <= a && (i = c.audioBuf.duration), (e.bufOffset = o < i ? o : a + ((o - a) % (i - a)));
							}
						else if (e.audioQueue[0]) e.bufOffset = (t - e.audioQueue[0]._startTime) * e.playbackRate;
						else {
							if (4136 !== e.type && e.looping) {
								var u = ur.sourceDuration(e) / e.playbackRate;
								u > 0 && (e.bufStartTime += Math.floor((t - e.bufStartTime) / u) * u);
							}
							for (var s = 0; s < e.bufQueue.length; s++) {
								if (e.bufsProcessed >= e.bufQueue.length) {
									if (!e.looping) {
										ur.setSourceState(e, 4116);
										break;
									}
									e.bufsProcessed %= e.bufQueue.length;
								}
								var c;
								if ((c = e.bufQueue[e.bufsProcessed]).length > 0) {
									if (t < (r = e.bufStartTime + c.audioBuf.duration / e.playbackRate)) {
										e.bufOffset = (t - e.bufStartTime) * e.playbackRate;
										break;
									}
									e.bufStartTime = r;
								}
								(e.bufOffset = 0), e.bufsProcessed++;
							}
						}
						return t;
					},
					cancelPendingSourceAudio: function (e) {
						ur.updateSourceTime(e);
						for (var t = 1; t < e.audioQueue.length; t++) e.audioQueue[t].stop();
						e.audioQueue.length > 1 && (e.audioQueue.length = 1);
					},
					stopSourceAudio: function (e) {
						for (var t = 0; t < e.audioQueue.length; t++) e.audioQueue[t].stop();
						e.audioQueue.length = 0;
					},
					setSourceState: function (e, t) {
						4114 === t
							? ((4114 !== e.state && 4116 != e.state) || ((e.bufsProcessed = 0), (e.bufOffset = 0)),
							  ur.stopSourceAudio(e),
							  (e.state = 4114),
							  (e.bufStartTime = Number.NEGATIVE_INFINITY),
							  ur.scheduleSourceAudio(e))
							: 4115 === t
							? 4114 === e.state && (ur.updateSourceTime(e), ur.stopSourceAudio(e), (e.state = 4115))
							: 4116 === t
							? 4113 !== e.state && ((e.state = 4116), (e.bufsProcessed = e.bufQueue.length), (e.bufStartTime = Number.NEGATIVE_INFINITY), (e.bufOffset = 0), ur.stopSourceAudio(e))
							: 4113 === t && 4113 !== e.state && ((e.state = 4113), (e.bufsProcessed = 0), (e.bufStartTime = Number.NEGATIVE_INFINITY), (e.bufOffset = 0), ur.stopSourceAudio(e));
					},
					initSourcePanner: function (e) {
						if (4144 !== e.type) {
							for (var t = ur.buffers[0], r = 0; r < e.bufQueue.length; r++)
								if (0 !== e.bufQueue[r].id) {
									t = e.bufQueue[r];
									break;
								}
							if (1 === e.spatialize || (2 === e.spatialize && 1 === t.channels)) {
								if (e.panner) return;
								(e.panner = e.context.audioCtx.createPanner()),
									ur.updateSourceGlobal(e),
									ur.updateSourceSpace(e),
									e.panner.connect(e.context.gain),
									e.gain.disconnect(),
									e.gain.connect(e.panner);
							} else {
								if (!e.panner) return;
								e.panner.disconnect(), e.gain.disconnect(), e.gain.connect(e.context.gain), (e.panner = null);
							}
						}
					},
					updateContextGlobal: function (e) {
						for (var t in e.sources) ur.updateSourceGlobal(e.sources[t]);
					},
					updateSourceGlobal: function (e) {
						var t = e.panner;
						if (t)
							switch (
								((t.refDistance = e.refDistance),
								(t.maxDistance = e.maxDistance),
								(t.rolloffFactor = e.rolloffFactor),
								(t.panningModel = e.context.hrtf ? 'HRTF' : 'equalpower'),
								e.context.sourceDistanceModel ? e.distanceModel : e.context.distanceModel)
							) {
								case 0:
									(t.distanceModel = 'inverse'), (t.refDistance = 340282e33);
									break;
								case 53249:
								case 53250:
									t.distanceModel = 'inverse';
									break;
								case 53251:
								case 53252:
									t.distanceModel = 'linear';
									break;
								case 53253:
								case 53254:
									t.distanceModel = 'exponential';
							}
					},
					updateListenerSpace: function (e) {
						var t = e.audioCtx.listener;
						for (var r in (t.positionX
							? ((t.positionX.value = e.listener.position[0]), (t.positionY.value = e.listener.position[1]), (t.positionZ.value = e.listener.position[2]))
							: t.setPosition(e.listener.position[0], e.listener.position[1], e.listener.position[2]),
						t.forwardX
							? ((t.forwardX.value = e.listener.direction[0]),
							  (t.forwardY.value = e.listener.direction[1]),
							  (t.forwardZ.value = e.listener.direction[2]),
							  (t.upX.value = e.listener.up[0]),
							  (t.upY.value = e.listener.up[1]),
							  (t.upZ.value = e.listener.up[2]))
							: t.setOrientation(e.listener.direction[0], e.listener.direction[1], e.listener.direction[2], e.listener.up[0], e.listener.up[1], e.listener.up[2]),
						e.sources))
							ur.updateSourceSpace(e.sources[r]);
					},
					updateSourceSpace: function (e) {
						if (e.panner) {
							var t = e.panner,
								r = e.position[0],
								n = e.position[1],
								o = e.position[2],
								a = e.direction[0],
								i = e.direction[1],
								u = e.direction[2],
								s = e.context.listener,
								c = s.position[0],
								l = s.position[1],
								f = s.position[2];
							if (e.relative) {
								var d = -s.direction[0],
									m = -s.direction[1],
									p = -s.direction[2],
									h = s.up[0],
									v = s.up[1],
									g = s.up[2],
									w = function (e, t, r) {
										var n = Math.sqrt(e * e + t * t + r * r);
										return n < Number.EPSILON ? 0 : 1 / n;
									},
									y = w(d, m, p);
								(d *= y), (m *= y), (p *= y);
								var b = (v *= y = w(h, v, g)) * p - (g *= y) * m,
									_ = g * d - (h *= y) * p,
									E = h * m - v * d,
									k = a,
									F = i,
									C = u;
								(a = k * (b *= y = w(b, _, E)) + F * (h = m * (E *= y) - p * (_ *= y)) + C * d),
									(i = k * _ + F * (v = p * b - d * E) + C * m),
									(u = k * E + F * (g = d * _ - m * b) + C * p),
									(r = (k = r) * b + (F = n) * h + (C = o) * d),
									(n = k * _ + F * v + C * m),
									(o = k * E + F * g + C * p),
									(r += c),
									(n += l),
									(o += f);
							}
							t.positionX ? ((t.positionX.value = r), (t.positionY.value = n), (t.positionZ.value = o)) : t.setPosition(r, n, o),
								t.orientationX ? ((t.orientationX.value = a), (t.orientationY.value = i), (t.orientationZ.value = u)) : t.setOrientation(a, i, u);
							var x = e.dopplerShift,
								S = e.velocity[0],
								T = e.velocity[1],
								D = e.velocity[2],
								P = s.velocity[0],
								M = s.velocity[1],
								A = s.velocity[2];
							if ((r === c && n === l && o === f) || (S === P && T === M && D === A)) e.dopplerShift = 1;
							else {
								var L = e.context.speedOfSound,
									R = e.context.dopplerFactor,
									I = c - r,
									B = l - n,
									U = f - o,
									O = Math.sqrt(I * I + B * B + U * U),
									N = (I * P + B * M + U * A) / O,
									j = (I * S + B * T + U * D) / O;
								(N = Math.min(N, L / R)), (j = Math.min(j, L / R)), (e.dopplerShift = (L - R * N) / (L - R * j));
							}
							e.dopplerShift !== x && ur.updateSourceRate(e);
						}
					},
					updateSourceRate: function (e) {
						if (4114 === e.state) {
							ur.cancelPendingSourceAudio(e);
							var t,
								r = e.audioQueue[0];
							if (!r) return;
							(t = 4136 === e.type && e.looping ? Number.POSITIVE_INFINITY : (r.buffer.duration - r._startOffset) / e.playbackRate),
								(r._duration = t),
								(r.playbackRate.value = e.playbackRate),
								ur.scheduleSourceAudio(e);
						}
					},
					sourceDuration: function (e) {
						for (var t = 0, r = 0; r < e.bufQueue.length; r++) {
							var n = e.bufQueue[r].audioBuf;
							t += n ? n.duration : 0;
						}
						return t;
					},
					sourceTell: function (e) {
						ur.updateSourceTime(e);
						for (var t = 0, r = 0; r < e.bufsProcessed; r++) t += e.bufQueue[r].audioBuf.duration;
						return (t += e.bufOffset);
					},
					sourceSeek: function (e, t) {
						var r = 4114 == e.state;
						if ((r && ur.setSourceState(e, 4113), null !== e.bufQueue[e.bufsProcessed].audioBuf)) {
							for (e.bufsProcessed = 0; t > e.bufQueue[e.bufsProcessed].audioBuf.duration; ) (t -= e.bufQueue[e.bufsProcessed].audiobuf.duration), e.bufsProcessed++;
							e.bufOffset = t;
						}
						r && ur.setSourceState(e, 4114);
					},
					getGlobalParam: function (e, t) {
						if (!ur.currentCtx) return null;
						switch (t) {
							case 49152:
								return ur.currentCtx.dopplerFactor;
							case 49155:
								return ur.currentCtx.speedOfSound;
							case 53248:
								return ur.currentCtx.distanceModel;
							default:
								return (ur.currentCtx.err = 40962), null;
						}
					},
					setGlobalParam: function (e, t, r) {
						if (ur.currentCtx)
							switch (t) {
								case 49152:
									if (!Number.isFinite(r) || r < 0) return void (ur.currentCtx.err = 40963);
									(ur.currentCtx.dopplerFactor = r), ur.updateListenerSpace(ur.currentCtx);
									break;
								case 49155:
									if (!Number.isFinite(r) || r <= 0) return void (ur.currentCtx.err = 40963);
									(ur.currentCtx.speedOfSound = r), ur.updateListenerSpace(ur.currentCtx);
									break;
								case 53248:
									switch (r) {
										case 0:
										case 53249:
										case 53250:
										case 53251:
										case 53252:
										case 53253:
										case 53254:
											(ur.currentCtx.distanceModel = r), ur.updateContextGlobal(ur.currentCtx);
											break;
										default:
											return void (ur.currentCtx.err = 40963);
									}
									break;
								default:
									return void (ur.currentCtx.err = 40962);
							}
					},
					getListenerParam: function (e, t) {
						if (!ur.currentCtx) return null;
						switch (t) {
							case 4100:
								return ur.currentCtx.listener.position;
							case 4102:
								return ur.currentCtx.listener.velocity;
							case 4111:
								return ur.currentCtx.listener.direction.concat(ur.currentCtx.listener.up);
							case 4106:
								return ur.currentCtx.gain.gain.value;
							default:
								return (ur.currentCtx.err = 40962), null;
						}
					},
					setListenerParam: function (e, t, r) {
						if (ur.currentCtx)
							if (null !== r) {
								var n = ur.currentCtx.listener;
								switch (t) {
									case 4100:
										if (!Number.isFinite(r[0]) || !Number.isFinite(r[1]) || !Number.isFinite(r[2])) return void (ur.currentCtx.err = 40963);
										(n.position[0] = r[0]), (n.position[1] = r[1]), (n.position[2] = r[2]), ur.updateListenerSpace(ur.currentCtx);
										break;
									case 4102:
										if (!Number.isFinite(r[0]) || !Number.isFinite(r[1]) || !Number.isFinite(r[2])) return void (ur.currentCtx.err = 40963);
										(n.velocity[0] = r[0]), (n.velocity[1] = r[1]), (n.velocity[2] = r[2]), ur.updateListenerSpace(ur.currentCtx);
										break;
									case 4106:
										if (!Number.isFinite(r) || r < 0) return void (ur.currentCtx.err = 40963);
										ur.currentCtx.gain.gain.value = r;
										break;
									case 4111:
										if (!(Number.isFinite(r[0]) && Number.isFinite(r[1]) && Number.isFinite(r[2]) && Number.isFinite(r[3]) && Number.isFinite(r[4]) && Number.isFinite(r[5])))
											return void (ur.currentCtx.err = 40963);
										(n.direction[0] = r[0]),
											(n.direction[1] = r[1]),
											(n.direction[2] = r[2]),
											(n.up[0] = r[3]),
											(n.up[1] = r[4]),
											(n.up[2] = r[5]),
											ur.updateListenerSpace(ur.currentCtx);
										break;
									default:
										return void (ur.currentCtx.err = 40962);
								}
							} else ur.currentCtx.err = 40962;
					},
					getBufferParam: function (e, t, r) {
						if (ur.currentCtx) {
							var n = ur.buffers[t];
							if (n && 0 !== t)
								switch (r) {
									case 8193:
										return n.frequency;
									case 8194:
										return 8 * n.bytesPerSample;
									case 8195:
										return n.channels;
									case 8196:
										return n.length * n.bytesPerSample * n.channels;
									case 8213:
										return 0 === n.length ? [0, 0] : [(n.audioBuf._loopStart || 0) * n.frequency, (n.audioBuf._loopEnd || n.length) * n.frequency];
									default:
										return (ur.currentCtx.err = 40962), null;
								}
							else ur.currentCtx.err = 40961;
						}
					},
					setBufferParam: function (e, t, r, n) {
						if (ur.currentCtx) {
							var o = ur.buffers[t];
							if (o && 0 !== t)
								if (null !== n)
									switch (r) {
										case 8196:
											if (0 !== n) return void (ur.currentCtx.err = 40963);
											break;
										case 8213:
											if (n[0] < 0 || n[0] > o.length || n[1] < 0 || n[1] > o.Length || n[0] >= n[1]) return void (ur.currentCtx.err = 40963);
											if (o.refCount > 0) return void (ur.currentCtx.err = 40964);
											o.audioBuf && ((o.audioBuf._loopStart = n[0] / o.frequency), (o.audioBuf._loopEnd = n[1] / o.frequency));
											break;
										default:
											return void (ur.currentCtx.err = 40962);
									}
								else ur.currentCtx.err = 40962;
							else ur.currentCtx.err = 40961;
						}
					},
					getSourceParam: function (e, t, r) {
						if (!ur.currentCtx) return null;
						var n = ur.currentCtx.sources[t];
						if (!n) return (ur.currentCtx.err = 40961), null;
						switch (r) {
							case 514:
								return n.relative;
							case 4097:
								return n.coneInnerAngle;
							case 4098:
								return n.coneOuterAngle;
							case 4099:
								return n.pitch;
							case 4100:
								return n.position;
							case 4101:
								return n.direction;
							case 4102:
								return n.velocity;
							case 4103:
								return n.looping;
							case 4105:
								return 4136 === n.type ? n.bufQueue[0].id : 0;
							case 4106:
								return n.gain.gain.value;
							case 4109:
								return n.minGain;
							case 4110:
								return n.maxGain;
							case 4112:
								return n.state;
							case 4117:
								return 1 === n.bufQueue.length && 0 === n.bufQueue[0].id ? 0 : n.bufQueue.length;
							case 4118:
								return (1 === n.bufQueue.length && 0 === n.bufQueue[0].id) || n.looping ? 0 : n.bufsProcessed;
							case 4128:
								return n.refDistance;
							case 4129:
								return n.rolloffFactor;
							case 4130:
								return n.coneOuterGain;
							case 4131:
								return n.maxDistance;
							case 4132:
								return ur.sourceTell(n);
							case 4133:
								return (o = ur.sourceTell(n)) > 0 && (o *= n.bufQueue[0].frequency), o;
							case 4134:
								var o;
								return (o = ur.sourceTell(n)) > 0 && (o *= n.bufQueue[0].frequency * n.bufQueue[0].bytesPerSample), o;
							case 4135:
								return n.type;
							case 4628:
								return n.spatialize;
							case 8201:
								for (var a = 0, i = 0, u = 0; u < n.bufQueue.length; u++)
									(a += n.bufQueue[u].length), 0 !== n.bufQueue[u].id && (i = n.bufQueue[u].bytesPerSample * n.bufQueue[u].channels);
								return a * i;
							case 8202:
								for (a = 0, u = 0; u < n.bufQueue.length; u++) a += n.bufQueue[u].length;
								return a;
							case 8203:
								return ur.sourceDuration(n);
							case 53248:
								return n.distanceModel;
							default:
								return (ur.currentCtx.err = 40962), null;
						}
					},
					setSourceParam: function (e, t, r, n) {
						if (ur.currentCtx) {
							var o = ur.currentCtx.sources[t];
							if (o)
								if (null !== n)
									switch (r) {
										case 514:
											if (1 === n) (o.relative = !0), ur.updateSourceSpace(o);
											else {
												if (0 !== n) return void (ur.currentCtx.err = 40963);
												(o.relative = !1), ur.updateSourceSpace(o);
											}
											break;
										case 4097:
											if (!Number.isFinite(n)) return void (ur.currentCtx.err = 40963);
											(o.coneInnerAngle = n), o.panner && (o.panner.coneInnerAngle = n % 360);
											break;
										case 4098:
											if (!Number.isFinite(n)) return void (ur.currentCtx.err = 40963);
											(o.coneOuterAngle = n), o.panner && (o.panner.coneOuterAngle = n % 360);
											break;
										case 4099:
											if (!Number.isFinite(n) || n <= 0) return void (ur.currentCtx.err = 40963);
											if (o.pitch === n) break;
											(o.pitch = n), ur.updateSourceRate(o);
											break;
										case 4100:
											if (!Number.isFinite(n[0]) || !Number.isFinite(n[1]) || !Number.isFinite(n[2])) return void (ur.currentCtx.err = 40963);
											(o.position[0] = n[0]), (o.position[1] = n[1]), (o.position[2] = n[2]), ur.updateSourceSpace(o);
											break;
										case 4101:
											if (!Number.isFinite(n[0]) || !Number.isFinite(n[1]) || !Number.isFinite(n[2])) return void (ur.currentCtx.err = 40963);
											(o.direction[0] = n[0]), (o.direction[1] = n[1]), (o.direction[2] = n[2]), ur.updateSourceSpace(o);
											break;
										case 4102:
											if (!Number.isFinite(n[0]) || !Number.isFinite(n[1]) || !Number.isFinite(n[2])) return void (ur.currentCtx.err = 40963);
											(o.velocity[0] = n[0]), (o.velocity[1] = n[1]), (o.velocity[2] = n[2]), ur.updateSourceSpace(o);
											break;
										case 4103:
											if (1 === n)
												(o.looping = !0),
													ur.updateSourceTime(o),
													4136 === o.type && o.audioQueue.length > 0 && (((a = o.audioQueue[0]).loop = !0), (a._duration = Number.POSITIVE_INFINITY));
											else {
												if (0 !== n) return void (ur.currentCtx.err = 40963);
												o.looping = !1;
												var a,
													i = ur.updateSourceTime(o);
												4136 === o.type &&
													o.audioQueue.length > 0 &&
													(((a = o.audioQueue[0]).loop = !1),
													(a._duration = o.bufQueue[0].audioBuf.duration / o.playbackRate),
													(a._startTime = i - o.bufOffset / o.playbackRate));
											}
											break;
										case 4105:
											if (4114 === o.state || 4115 === o.state) return void (ur.currentCtx.err = 40964);
											if (0 === n) {
												for (var u in o.bufQueue) o.bufQueue[u].refCount--;
												(o.bufQueue.length = 1), (o.bufQueue[0] = ur.buffers[0]), (o.bufsProcessed = 0), (o.type = 4144);
											} else {
												if (!(d = ur.buffers[n])) return void (ur.currentCtx.err = 40963);
												for (var u in o.bufQueue) o.bufQueue[u].refCount--;
												(o.bufQueue.length = 0), d.refCount++, (o.bufQueue = [d]), (o.bufsProcessed = 0), (o.type = 4136);
											}
											ur.initSourcePanner(o), ur.scheduleSourceAudio(o);
											break;
										case 4106:
											if (!Number.isFinite(n) || n < 0) return void (ur.currentCtx.err = 40963);
											o.gain.gain.value = n;
											break;
										case 4109:
											if (!Number.isFinite(n) || n < 0 || n > Math.min(o.maxGain, 1)) return void (ur.currentCtx.err = 40963);
											o.minGain = n;
											break;
										case 4110:
											if (!Number.isFinite(n) || n < Math.max(0, o.minGain) || n > 1) return void (ur.currentCtx.err = 40963);
											o.maxGain = n;
											break;
										case 4128:
											if (!Number.isFinite(n) || n < 0) return void (ur.currentCtx.err = 40963);
											(o.refDistance = n), o.panner && (o.panner.refDistance = n);
											break;
										case 4129:
											if (!Number.isFinite(n) || n < 0) return void (ur.currentCtx.err = 40963);
											(o.rolloffFactor = n), o.panner && (o.panner.rolloffFactor = n);
											break;
										case 4130:
											if (!Number.isFinite(n) || n < 0 || n > 1) return void (ur.currentCtx.err = 40963);
											(o.coneOuterGain = n), o.panner && (o.panner.coneOuterGain = n);
											break;
										case 4131:
											if (!Number.isFinite(n) || n < 0) return void (ur.currentCtx.err = 40963);
											(o.maxDistance = n), o.panner && (o.panner.maxDistance = n);
											break;
										case 4132:
											if (n < 0 || n > ur.sourceDuration(o)) return void (ur.currentCtx.err = 40963);
											ur.sourceSeek(o, n);
											break;
										case 4133:
											if ((l = ur.sourceDuration(o)) > 0) {
												var s;
												for (var c in o.bufQueue)
													if (c) {
														s = o.bufQueue[c].frequency;
														break;
													}
												n /= s;
											}
											if (n < 0 || n > l) return void (ur.currentCtx.err = 40963);
											ur.sourceSeek(o, n);
											break;
										case 4134:
											var l;
											if ((l = ur.sourceDuration(o)) > 0) {
												var f;
												for (var c in o.bufQueue)
													if (c) {
														var d;
														f = (d = o.bufQueue[c]).frequency * d.bytesPerSample * d.channels;
														break;
													}
												n /= f;
											}
											if (n < 0 || n > l) return void (ur.currentCtx.err = 40963);
											ur.sourceSeek(o, n);
											break;
										case 4628:
											if (0 !== n && 1 !== n && 2 !== n) return void (ur.currentCtx.err = 40963);
											(o.spatialize = n), ur.initSourcePanner(o);
											break;
										case 8201:
										case 8202:
										case 8203:
											ur.currentCtx.err = 40964;
											break;
										case 53248:
											switch (n) {
												case 0:
												case 53249:
												case 53250:
												case 53251:
												case 53252:
												case 53253:
												case 53254:
													(o.distanceModel = n), ur.currentCtx.sourceDistanceModel && ur.updateContextGlobal(ur.currentCtx);
													break;
												default:
													return void (ur.currentCtx.err = 40963);
											}
											break;
										default:
											return void (ur.currentCtx.err = 40962);
									}
								else ur.currentCtx.err = 40962;
							else ur.currentCtx.err = 40961;
						}
					},
					captures: {},
					sharedCaptureAudioCtx: null,
					requireValidCaptureDevice: function (e, t) {
						if (0 === e) return (ur.alcErr = 40961), null;
						var r = ur.captures[e];
						return r ? (r.mediaStreamError ? ((ur.alcErr = 40961), null) : r) : ((ur.alcErr = 40961), null);
					}
				};
			function sr(e, t, r) {
				switch (t) {
					case 514:
					case 4097:
					case 4098:
					case 4103:
					case 4105:
					case 4128:
					case 4129:
					case 4131:
					case 4132:
					case 4133:
					case 4134:
					case 4628:
					case 8201:
					case 8202:
					case 53248:
						ur.setSourceParam('alSourcei', e, t, r);
						break;
					default:
						ur.setSourceParam('alSourcei', e, t, null);
				}
			}
			function cr(e) {
				try {
					return w.grow((e - M.byteLength + 65535) >>> 16), Q(w.buffer), 1;
				} catch (t) {}
			}
			var lr = {};
			function fr() {
				if (!fr.strings) {
					var e = {
						USER: 'web_user',
						LOGNAME: 'web_user',
						PATH: '/',
						PWD: '/',
						HOME: '/home/web_user',
						LANG: (('object' == typeof navigator && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8',
						_: u || './this.program'
					};
					for (var t in lr) e[t] = lr[t];
					var r = [];
					for (var t in e) r.push(t + '=' + e[t]);
					fr.strings = r;
				}
				return fr.strings;
			}
			var dr = {
					counter: 1,
					buffers: [],
					programs: [],
					framebuffers: [],
					renderbuffers: [],
					textures: [],
					shaders: [],
					vaos: [],
					contexts: [],
					offscreenCanvases: {},
					queries: [],
					samplers: [],
					transformFeedbacks: [],
					syncs: [],
					stringCache: {},
					stringiCache: {},
					unpackAlignment: 4,
					recordError: function (e) {
						dr.lastError || (dr.lastError = e);
					},
					getNewId: function (e) {
						for (var t = dr.counter++, r = e.length; r < t; r++) e[r] = null;
						return t;
					},
					getSource: function (e, t, r, n) {
						for (var o = '', a = 0; a < t; ++a) {
							var i = n ? B[(n + 4 * a) >> 2] : -1;
							o += S(B[(r + 4 * a) >> 2], i < 0 ? void 0 : i);
						}
						return o;
					},
					createContext: function (e, t) {
						e.getContextSafariWebGL2Fixed ||
							((e.getContextSafariWebGL2Fixed = e.getContext),
							(e.getContext = function (t, r) {
								var n = e.getContextSafariWebGL2Fixed(t, r);
								return ('webgl' == t) == n instanceof WebGLRenderingContext ? n : null;
							}));
						var r = t.majorVersion > 1 ? e.getContext('webgl2', t) : e.getContext('webgl', t);
						return r ? dr.registerContext(r, t) : 0;
					},
					registerContext: function (e, t) {
						var r = dr.getNewId(dr.contexts),
							n = { handle: r, attributes: t, version: t.majorVersion, GLctx: e };
						return e.canvas && (e.canvas.GLctxObject = n), (dr.contexts[r] = n), (void 0 === t.enableExtensionsByDefault || t.enableExtensionsByDefault) && dr.initExtensions(n), r;
					},
					makeContextCurrent: function (t) {
						return (dr.currentContext = dr.contexts[t]), (e.ctx = Mr = dr.currentContext && dr.currentContext.GLctx), !(t && !Mr);
					},
					getContext: function (e) {
						return dr.contexts[e];
					},
					deleteContext: function (e) {
						dr.currentContext === dr.contexts[e] && (dr.currentContext = null),
							'object' == typeof JSEvents && JSEvents.removeAllHandlersOnTarget(dr.contexts[e].GLctx.canvas),
							dr.contexts[e] && dr.contexts[e].GLctx.canvas && (dr.contexts[e].GLctx.canvas.GLctxObject = void 0),
							(dr.contexts[e] = null);
					},
					initExtensions: function (e) {
						if ((e || (e = dr.currentContext), !e.initExtensionsDone)) {
							e.initExtensionsDone = !0;
							var t,
								r = e.GLctx;
							!(function (e) {
								var t = e.getExtension('ANGLE_instanced_arrays');
								t &&
									((e.vertexAttribDivisor = function (e, r) {
										t.vertexAttribDivisorANGLE(e, r);
									}),
									(e.drawArraysInstanced = function (e, r, n, o) {
										t.drawArraysInstancedANGLE(e, r, n, o);
									}),
									(e.drawElementsInstanced = function (e, r, n, o, a) {
										t.drawElementsInstancedANGLE(e, r, n, o, a);
									}));
							})(r),
								(function (e) {
									var t = e.getExtension('OES_vertex_array_object');
									t &&
										((e.createVertexArray = function () {
											return t.createVertexArrayOES();
										}),
										(e.deleteVertexArray = function (e) {
											t.deleteVertexArrayOES(e);
										}),
										(e.bindVertexArray = function (e) {
											t.bindVertexArrayOES(e);
										}),
										(e.isVertexArray = function (e) {
											return t.isVertexArrayOES(e);
										}));
								})(r),
								(function (e) {
									var t = e.getExtension('WEBGL_draw_buffers');
									t &&
										(e.drawBuffers = function (e, r) {
											t.drawBuffersWEBGL(e, r);
										});
								})(r),
								((t = r).dibvbi = t.getExtension('WEBGL_draw_instanced_base_vertex_base_instance')),
								(function (e) {
									e.mdibvbi = e.getExtension('WEBGL_multi_draw_instanced_base_vertex_base_instance');
								})(r),
								e.version >= 2 && (r.disjointTimerQueryExt = r.getExtension('EXT_disjoint_timer_query_webgl2')),
								(e.version < 2 || !r.disjointTimerQueryExt) && (r.disjointTimerQueryExt = r.getExtension('EXT_disjoint_timer_query')),
								(function (e) {
									e.multiDrawWebgl = e.getExtension('WEBGL_multi_draw');
								})(r),
								(r.getSupportedExtensions() || []).forEach(function (e) {
									e.includes('lose_context') || e.includes('debug') || r.getExtension(e);
								});
						}
					}
				},
				mr = [];
			function pr(e, t, r, n) {
				for (var o = 0; o < e; o++) {
					var a = Mr[r](),
						i = a && dr.getNewId(n);
					a ? ((a.name = i), (n[i] = a)) : dr.recordError(1282), (B[(t + 4 * o) >> 2] = i);
				}
			}
			function hr(e, t, r) {
				if (t) {
					var n,
						o,
						a = void 0;
					switch (e) {
						case 36346:
							a = 1;
							break;
						case 36344:
							return void (0 != r && 1 != r && dr.recordError(1280));
						case 34814:
						case 36345:
							a = 0;
							break;
						case 34466:
							var i = Mr.getParameter(34467);
							a = i ? i.length : 0;
							break;
						case 33309:
							if (dr.currentContext.version < 2) return void dr.recordError(1282);
							a = 2 * (Mr.getSupportedExtensions() || []).length;
							break;
						case 33307:
						case 33308:
							if (dr.currentContext.version < 2) return void dr.recordError(1280);
							a = 33307 == e ? 3 : 0;
					}
					if (void 0 === a) {
						var u = Mr.getParameter(e);
						switch (typeof u) {
							case 'number':
								a = u;
								break;
							case 'boolean':
								a = u ? 1 : 0;
								break;
							case 'string':
								return void dr.recordError(1280);
							case 'object':
								if (null === u)
									switch (e) {
										case 34964:
										case 35725:
										case 34965:
										case 36006:
										case 36007:
										case 32873:
										case 34229:
										case 36662:
										case 36663:
										case 35053:
										case 35055:
										case 36010:
										case 35097:
										case 35869:
										case 32874:
										case 36389:
										case 35983:
										case 35368:
										case 34068:
											a = 0;
											break;
										default:
											return void dr.recordError(1280);
									}
								else {
									if (u instanceof Float32Array || u instanceof Uint32Array || u instanceof Int32Array || u instanceof Array) {
										for (var s = 0; s < u.length; ++s)
											switch (r) {
												case 0:
													B[(t + 4 * s) >> 2] = u[s];
													break;
												case 2:
													O[(t + 4 * s) >> 2] = u[s];
													break;
												case 4:
													A[(t + s) >> 0] = u[s] ? 1 : 0;
											}
										return;
									}
									try {
										a = 0 | u.name;
									} catch (c) {
										return dr.recordError(1280), void f('GL_INVALID_ENUM in glGet' + r + 'v: Unknown object returned from WebGL getParameter(' + e + ')! (error: ' + c + ')');
									}
								}
								break;
							default:
								return (
									dr.recordError(1280),
									void f('GL_INVALID_ENUM in glGet' + r + 'v: Native code calling glGet' + r + 'v(' + e + ') and it returns ' + u + ' of type ' + typeof u + '!')
								);
						}
					}
					switch (r) {
						case 1:
							(o = a), (U[(n = t) >> 2] = o), (U[(n + 4) >> 2] = (o - U[n >> 2]) / 4294967296);
							break;
						case 0:
							B[t >> 2] = a;
							break;
						case 2:
							O[t >> 2] = a;
							break;
						case 4:
							A[t >> 0] = a ? 1 : 0;
					}
				} else dr.recordError(1281);
			}
			function vr(e) {
				return parseInt(e);
			}
			function gr(e) {
				return 0 == (e -= 5120) ? A : 1 == e ? L : 2 == e ? R : 4 == e ? B : 6 == e ? O : 5 == e || 28922 == e || 28520 == e || 30779 == e || 30782 == e ? U : I;
			}
			function wr(e) {
				return 31 - Math.clz32(e.BYTES_PER_ELEMENT);
			}
			function yr(e, t, r, n, o, a) {
				var i = gr(e),
					u = wr(i),
					s = 1 << u,
					c = (function (e, t, r, n) {
						var o;
						return t * ((e * r + (o = n) - 1) & -o);
					})(
						r,
						n,
						(function (e) {
							return { 5: 3, 6: 4, 8: 2, 29502: 3, 29504: 4, 26917: 2, 26918: 2, 29846: 3, 29847: 4 }[e - 6402] || 1;
						})(t) * s,
						dr.unpackAlignment
					);
				return i.subarray(o >> u, (o + c) >> u);
			}
			function br(e) {
				var t = Mr.currentProgram,
					r = t.uniformLocsById[e];
				return r >= 0 && (t.uniformLocsById[e] = r = Mr.getUniformLocation(t, t.uniformArrayNamesById[e] + (r > 0 ? '[' + r + ']' : ''))), r;
			}
			var _r = [];
			function Er(e, t, r, n, o, a) {
				(this.id = e),
					(this.x = 0),
					(this.y = 0),
					(this.fullscreen = !1),
					(this.storedX = 0),
					(this.storedY = 0),
					(this.width = t),
					(this.height = r),
					(this.storedWidth = t),
					(this.storedHeight = r),
					(this.title = n),
					(this.monitor = o),
					(this.share = a),
					(this.attributes = kr.hints),
					(this.inputModes = { 208897: 212993, 208898: 0, 208899: 0 }),
					(this.buttons = 0),
					(this.keys = new Array()),
					(this.domKeys = new Array()),
					(this.shouldClose = 0),
					(this.title = null),
					(this.windowPosFunc = null),
					(this.windowSizeFunc = null),
					(this.windowCloseFunc = null),
					(this.windowRefreshFunc = null),
					(this.windowFocusFunc = null),
					(this.windowIconifyFunc = null),
					(this.framebufferSizeFunc = null),
					(this.mouseButtonFunc = null),
					(this.cursorPosFunc = null),
					(this.cursorEnterFunc = null),
					(this.scrollFunc = null),
					(this.dropFunc = null),
					(this.keyFunc = null),
					(this.charFunc = null),
					(this.userptr = null);
			}
			var kr = {
				WindowFromId: function (e) {
					return e <= 0 || !kr.windows ? null : kr.windows[e - 1];
				},
				joystickFunc: null,
				errorFunc: null,
				monitorFunc: null,
				active: null,
				windows: null,
				monitors: null,
				monitorString: null,
				versionString: null,
				initialTime: null,
				extensions: null,
				hints: null,
				defaultHints: {
					131073: 0,
					131074: 0,
					131075: 1,
					131076: 1,
					131077: 1,
					135169: 8,
					135170: 8,
					135171: 8,
					135172: 8,
					135173: 24,
					135174: 8,
					135175: 0,
					135176: 0,
					135177: 0,
					135178: 0,
					135179: 0,
					135180: 0,
					135181: 0,
					135182: 0,
					135183: 0,
					139265: 196609,
					139266: 1,
					139267: 0,
					139268: 0,
					139269: 0,
					139270: 0,
					139271: 0,
					139272: 0
				},
				DOMToGLFWKeyCode: function (e) {
					switch (e) {
						case 32:
							return 32;
						case 222:
							return 39;
						case 188:
							return 44;
						case 173:
						case 189:
							return 45;
						case 190:
							return 46;
						case 191:
							return 47;
						case 48:
							return 48;
						case 49:
							return 49;
						case 50:
							return 50;
						case 51:
							return 51;
						case 52:
							return 52;
						case 53:
							return 53;
						case 54:
							return 54;
						case 55:
							return 55;
						case 56:
							return 56;
						case 57:
							return 57;
						case 59:
							return 59;
						case 61:
						case 187:
							return 61;
						case 65:
							return 65;
						case 66:
							return 66;
						case 67:
							return 67;
						case 68:
							return 68;
						case 69:
							return 69;
						case 70:
							return 70;
						case 71:
							return 71;
						case 72:
							return 72;
						case 73:
							return 73;
						case 74:
							return 74;
						case 75:
							return 75;
						case 76:
							return 76;
						case 77:
							return 77;
						case 78:
							return 78;
						case 79:
							return 79;
						case 80:
							return 80;
						case 81:
							return 81;
						case 82:
							return 82;
						case 83:
							return 83;
						case 84:
							return 84;
						case 85:
							return 85;
						case 86:
							return 86;
						case 87:
							return 87;
						case 88:
							return 88;
						case 89:
							return 89;
						case 90:
							return 90;
						case 219:
							return 91;
						case 220:
							return 92;
						case 221:
							return 93;
						case 192:
							return 94;
						case 27:
							return 256;
						case 13:
							return 257;
						case 9:
							return 258;
						case 8:
							return 259;
						case 45:
							return 260;
						case 46:
							return 261;
						case 39:
							return 262;
						case 37:
							return 263;
						case 40:
							return 264;
						case 38:
							return 265;
						case 33:
							return 266;
						case 34:
							return 267;
						case 36:
							return 268;
						case 35:
							return 269;
						case 20:
							return 280;
						case 145:
							return 281;
						case 144:
							return 282;
						case 44:
							return 283;
						case 19:
							return 284;
						case 112:
							return 290;
						case 113:
							return 291;
						case 114:
							return 292;
						case 115:
							return 293;
						case 116:
							return 294;
						case 117:
							return 295;
						case 118:
							return 296;
						case 119:
							return 297;
						case 120:
							return 298;
						case 121:
							return 299;
						case 122:
							return 300;
						case 123:
							return 301;
						case 124:
							return 302;
						case 125:
							return 303;
						case 126:
							return 304;
						case 127:
							return 305;
						case 128:
							return 306;
						case 129:
							return 307;
						case 130:
							return 308;
						case 131:
							return 309;
						case 132:
							return 310;
						case 133:
							return 311;
						case 134:
							return 312;
						case 135:
							return 313;
						case 136:
							return 314;
						case 96:
							return 320;
						case 97:
							return 321;
						case 98:
							return 322;
						case 99:
							return 323;
						case 100:
							return 324;
						case 101:
							return 325;
						case 102:
							return 326;
						case 103:
							return 327;
						case 104:
							return 328;
						case 105:
							return 329;
						case 110:
							return 330;
						case 111:
							return 331;
						case 106:
							return 332;
						case 109:
							return 333;
						case 107:
							return 334;
						case 16:
							return 340;
						case 17:
							return 341;
						case 18:
							return 342;
						case 91:
							return 343;
						case 93:
							return 348;
						default:
							return -1;
					}
				},
				getModBits: function (e) {
					var t = 0;
					return e.keys[340] && (t |= 1), e.keys[341] && (t |= 2), e.keys[342] && (t |= 4), e.keys[343] && (t |= 8), t;
				},
				onKeyPress: function (e) {
					if (kr.active && kr.active.charFunc && !e.ctrlKey && !e.metaKey) {
						var t = e.charCode;
						0 == t || (t >= 0 && t <= 31) || j.get(kr.active.charFunc)(kr.active.id, t);
					}
				},
				onKeyChanged: function (e, t) {
					if (kr.active) {
						var r = kr.DOMToGLFWKeyCode(e);
						if (-1 != r) {
							var n = t && kr.active.keys[r];
							(kr.active.keys[r] = t), (kr.active.domKeys[e] = t), kr.active.keyFunc && (n && (t = 2), j.get(kr.active.keyFunc)(kr.active.id, r, e, t, kr.getModBits(kr.active)));
						}
					}
				},
				onGamepadConnected: function (e) {
					kr.refreshJoysticks();
				},
				onGamepadDisconnected: function (e) {
					kr.refreshJoysticks();
				},
				onKeydown: function (e) {
					kr.onKeyChanged(e.keyCode, 1), (8 !== e.keyCode && 9 !== e.keyCode) || e.preventDefault();
				},
				onKeyup: function (e) {
					kr.onKeyChanged(e.keyCode, 0);
				},
				onBlur: function (e) {
					if (kr.active) for (var t = 0; t < kr.active.domKeys.length; ++t) kr.active.domKeys[t] && kr.onKeyChanged(t, 0);
				},
				onMousemove: function (t) {
					kr.active && (ir.calculateMouseEvent(t), t.target == e.canvas && kr.active.cursorPosFunc && j.get(kr.active.cursorPosFunc)(kr.active.id, ir.mouseX, ir.mouseY));
				},
				DOMToGLFWMouseButton: function (e) {
					var t = e.button;
					return t > 0 && (t = 1 == t ? 2 : 1), t;
				},
				onMouseenter: function (t) {
					kr.active && t.target == e.canvas && kr.active.cursorEnterFunc && j.get(kr.active.cursorEnterFunc)(kr.active.id, 1);
				},
				onMouseleave: function (t) {
					kr.active && t.target == e.canvas && kr.active.cursorEnterFunc && j.get(kr.active.cursorEnterFunc)(kr.active.id, 0);
				},
				onMouseButtonChanged: function (t, r) {
					if (kr.active && (ir.calculateMouseEvent(t), t.target == e.canvas)) {
						var n = kr.DOMToGLFWMouseButton(t);
						if (1 == r) {
							kr.active.buttons |= 1 << n;
							try {
								t.target.setCapture();
							} catch (o) {}
						} else kr.active.buttons &= ~(1 << n);
						kr.active.mouseButtonFunc && j.get(kr.active.mouseButtonFunc)(kr.active.id, n, r, kr.getModBits(kr.active));
					}
				},
				onMouseButtonDown: function (e) {
					kr.active && kr.onMouseButtonChanged(e, 1);
				},
				onMouseButtonUp: function (e) {
					kr.active && kr.onMouseButtonChanged(e, 0);
				},
				onMouseWheel: function (t) {
					var r = -ir.getMouseWheelDelta(t);
					if (((r = 0 == r ? 0 : r > 0 ? Math.max(r, 1) : Math.min(r, -1)), (kr.wheelPos += r), kr.active && kr.active.scrollFunc && t.target == e.canvas)) {
						var n = 0,
							o = 0;
						'mousewheel' == t.type ? ((n = t.wheelDeltaX), (o = t.wheelDeltaY)) : ((n = t.deltaX), (o = t.deltaY)), j.get(kr.active.scrollFunc)(kr.active.id, n, o), t.preventDefault();
					}
				},
				onCanvasResize: function (e, t) {
					if (kr.active) {
						var r = !0;
						document.fullscreen || document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen
							? ((kr.active.storedX = kr.active.x),
							  (kr.active.storedY = kr.active.y),
							  (kr.active.storedWidth = kr.active.width),
							  (kr.active.storedHeight = kr.active.height),
							  (kr.active.x = kr.active.y = 0),
							  (kr.active.width = screen.width),
							  (kr.active.height = screen.height),
							  (kr.active.fullscreen = !0))
							: 1 == kr.active.fullscreen
							? ((kr.active.x = kr.active.storedX),
							  (kr.active.y = kr.active.storedY),
							  (kr.active.width = kr.active.storedWidth),
							  (kr.active.height = kr.active.storedHeight),
							  (kr.active.fullscreen = !1))
							: kr.active.width != e || kr.active.height != t
							? ((kr.active.width = e), (kr.active.height = t))
							: (r = !1),
							r && (ir.setCanvasSize(kr.active.width, kr.active.height, !0), kr.onWindowSizeChanged(), kr.onFramebufferSizeChanged());
					}
				},
				onWindowSizeChanged: function () {
					kr.active && kr.active.windowSizeFunc && j.get(kr.active.windowSizeFunc)(kr.active.id, kr.active.width, kr.active.height);
				},
				onFramebufferSizeChanged: function () {
					kr.active && kr.active.framebufferSizeFunc && j.get(kr.active.framebufferSizeFunc)(kr.active.id, kr.active.width, kr.active.height);
				},
				getTime: function () {
					return ce() / 1e3;
				},
				setWindowTitle: function (e, t) {
					var r = kr.WindowFromId(e);
					r && ((r.title = S(t)), kr.active.id == r.id && (document.title = r.title));
				},
				setJoystickCallback: function (e) {
					(kr.joystickFunc = e), kr.refreshJoysticks();
				},
				joys: {},
				lastGamepadState: null,
				lastGamepadStateFrame: null,
				refreshJoysticks: function () {
					if (ir.mainLoop.currentFrameNumber !== kr.lastGamepadStateFrame || !ir.mainLoop.currentFrameNumber) {
						(kr.lastGamepadState = navigator.getGamepads ? navigator.getGamepads() : navigator.webkitGetGamepads ? navigator.webkitGetGamepads : null),
							(kr.lastGamepadStateFrame = ir.mainLoop.currentFrameNumber);
						for (var e = 0; e < kr.lastGamepadState.length; ++e) {
							var t = kr.lastGamepadState[e];
							if (t) {
								kr.joys[e] ||
									(console.log('glfw joystick connected:', e),
									(kr.joys[e] = {
										id: F(Ur(t.id), 0),
										buttonsCount: t.buttons.length,
										axesCount: t.axes.length,
										buttons: F(new Array(t.buttons.length), 0),
										axes: F(new Array(4 * t.axes.length), 0)
									}),
									kr.joystickFunc && j.get(kr.joystickFunc)(e, 262145));
								for (var r = kr.joys[e], n = 0; n < t.buttons.length; ++n) b(r.buttons + n, t.buttons[n].pressed, 'i8');
								for (n = 0; n < t.axes.length; ++n) b(r.axes + 4 * n, t.axes[n], 'float');
							} else
								kr.joys[e] &&
									(console.log('glfw joystick disconnected', e),
									kr.joystickFunc && j.get(kr.joystickFunc)(e, 262146),
									zr(kr.joys[e].id),
									zr(kr.joys[e].buttons),
									zr(kr.joys[e].axes),
									delete kr.joys[e]);
						}
					}
				},
				setKeyCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.keyFunc;
					return (r.keyFunc = t), n;
				},
				setCharCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.charFunc;
					return (r.charFunc = t), n;
				},
				setMouseButtonCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.mouseButtonFunc;
					return (r.mouseButtonFunc = t), n;
				},
				setCursorPosCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.cursorPosFunc;
					return (r.cursorPosFunc = t), n;
				},
				setScrollCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.scrollFunc;
					return (r.scrollFunc = t), n;
				},
				setDropCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.dropFunc;
					return (r.dropFunc = t), n;
				},
				onDrop: function (e) {
					if (kr.active && kr.active.dropFunc && e.dataTransfer && e.dataTransfer.files && 0 != e.dataTransfer.files.length) {
						e.preventDefault();
						var t = F(new Array(4 * e.dataTransfer.files.length), 0),
							r = [],
							n = e.dataTransfer.files.length,
							o = 0,
							a = '.glfw_dropped_files';
						Me.createPath('/', a);
						for (var i = 0; i < n; ++i) u(e.dataTransfer.files[i]);
						return !1;
					}
					function u(e) {
						var u = '/' + a + '/' + e.name.replace(/\//g, '_'),
							s = new FileReader();
						(s.onloadend = function (a) {
							if (2 != s.readyState) return ++o, void console.log('failed to read dropped file: ' + e.name + ': ' + s.error);
							var i = a.target.result;
							if ((Me.writeFile(u, new Uint8Array(i)), ++o === n)) {
								j.get(kr.active.dropFunc)(kr.active.id, n, t);
								for (var c = 0; c < r.length; ++c) zr(r[c]);
								zr(t);
							}
						}),
							s.readAsArrayBuffer(e);
						var c = F(Ur(u), 0);
						r.push(c), b(t + 4 * i, c, 'i8*');
					}
				},
				onDragover: function (e) {
					if (kr.active && kr.active.dropFunc) return e.preventDefault(), !1;
				},
				setWindowSizeCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.windowSizeFunc;
					return (r.windowSizeFunc = t), n;
				},
				setWindowCloseCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.windowCloseFunc;
					return (r.windowCloseFunc = t), n;
				},
				setWindowRefreshCallback: function (e, t) {
					var r = kr.WindowFromId(e);
					if (!r) return null;
					var n = r.windowRefreshFunc;
					return (r.windowRefreshFunc = t), n;
				},
				onClickRequestPointerLock: function (t) {
					!ir.pointerLock && e.canvas.requestPointerLock && (e.canvas.requestPointerLock(), t.preventDefault());
				},
				setInputMode: function (t, r, n) {
					var o = kr.WindowFromId(t);
					if (o)
						switch (r) {
							case 208897:
								switch (n) {
									case 212993:
										(o.inputModes[r] = n), e.canvas.removeEventListener('click', kr.onClickRequestPointerLock, !0), e.canvas.exitPointerLock();
										break;
									case 212994:
										console.log('glfwSetInputMode called with GLFW_CURSOR_HIDDEN value not implemented.');
										break;
									case 212995:
										(o.inputModes[r] = n), e.canvas.addEventListener('click', kr.onClickRequestPointerLock, !0), e.canvas.requestPointerLock();
										break;
									default:
										console.log('glfwSetInputMode called with unknown value parameter value: ' + n + '.');
								}
								break;
							case 208898:
								console.log('glfwSetInputMode called with GLFW_STICKY_KEYS mode not implemented.');
								break;
							case 208899:
								console.log('glfwSetInputMode called with GLFW_STICKY_MOUSE_BUTTONS mode not implemented.');
								break;
							default:
								console.log('glfwSetInputMode called with unknown mode parameter value: ' + r + '.');
						}
				},
				getKey: function (e, t) {
					var r = kr.WindowFromId(e);
					return r ? r.keys[t] : 0;
				},
				getMouseButton: function (e, t) {
					var r = kr.WindowFromId(e);
					return r ? (r.buttons & (1 << t)) > 0 : 0;
				},
				getCursorPos: function (e, t, r) {
					b(t, ir.mouseX, 'double'), b(r, ir.mouseY, 'double');
				},
				getMousePos: function (e, t, r) {
					b(t, ir.mouseX, 'i32'), b(r, ir.mouseY, 'i32');
				},
				setCursorPos: function (e, t, r) {},
				getWindowPos: function (e, t, r) {
					var n = 0,
						o = 0,
						a = kr.WindowFromId(e);
					a && ((n = a.x), (o = a.y)), t && b(t, n, 'i32'), r && b(r, o, 'i32');
				},
				setWindowPos: function (e, t, r) {
					var n = kr.WindowFromId(e);
					n && ((n.x = t), (n.y = r));
				},
				getWindowSize: function (e, t, r) {
					var n = 0,
						o = 0,
						a = kr.WindowFromId(e);
					a && ((n = a.width), (o = a.height)), t && b(t, n, 'i32'), r && b(r, o, 'i32');
				},
				setWindowSize: function (e, t, r) {
					var n = kr.WindowFromId(e);
					n &&
						(kr.active.id == n.id && (t == screen.width && r == screen.height ? ir.requestFullscreen() : (ir.exitFullscreen(), ir.setCanvasSize(t, r), (n.width = t), (n.height = r))),
						n.windowSizeFunc && j.get(n.windowSizeFunc)(n.id, t, r));
				},
				createWindow: function (t, r, n, o, a) {
					var i, u;
					for (i = 0; i < kr.windows.length && null !== kr.windows[i]; i++);
					if (i > 0) throw 'glfwCreateWindow only supports one window at time currently';
					if (((u = i + 1), t <= 0 || r <= 0)) return 0;
					for (o ? ir.requestFullscreen() : ir.setCanvasSize(t, r), i = 0; i < kr.windows.length && null == kr.windows[i]; i++);
					var s = kr.hints[139265] > 0;
					if (i == kr.windows.length)
						if (s) {
							var c = { antialias: kr.hints[135181] > 1, depth: kr.hints[135173] > 0, stencil: kr.hints[135174] > 0, alpha: kr.hints[135172] > 0 };
							e.ctx = ir.createContext(e.canvas, !0, !0, c);
						} else ir.init();
					if (!e.ctx && s) return 0;
					var l = new Er(u, t, r, n, o, a);
					return u - 1 == kr.windows.length ? kr.windows.push(l) : (kr.windows[u - 1] = l), (kr.active = l), l.id;
				},
				destroyWindow: function (t) {
					var r = kr.WindowFromId(t);
					if (r) {
						r.windowCloseFunc && j.get(r.windowCloseFunc)(r.id), (kr.windows[r.id - 1] = null), kr.active.id == r.id && (kr.active = null);
						for (var n = 0; n < kr.windows.length; n++) if (null !== kr.windows[n]) return;
						e.ctx = ir.destroyContext(e.canvas, !0, !0);
					}
				},
				swapBuffers: function (e) {},
				GLFW2ParamToGLFW3Param: function (e) {
					return {
						196609: 0,
						196610: 0,
						196611: 0,
						196612: 0,
						196613: 0,
						196614: 0,
						131073: 0,
						131074: 0,
						131075: 0,
						131076: 0,
						131077: 135169,
						131078: 135170,
						131079: 135171,
						131080: 135172,
						131081: 135173,
						131082: 135174,
						131083: 135183,
						131084: 135175,
						131085: 135176,
						131086: 135177,
						131087: 135178,
						131088: 135179,
						131089: 135180,
						131090: 0,
						131091: 135181,
						131092: 139266,
						131093: 139267,
						131094: 139270,
						131095: 139271,
						131096: 139272
					}[e];
				}
			};
			function Fr() {
				if (!Fr.called) {
					Fr.called = !0;
					var e = new Date().getFullYear(),
						t = new Date(e, 0, 1),
						r = new Date(e, 6, 1),
						n = t.getTimezoneOffset(),
						o = r.getTimezoneOffset(),
						a = Math.max(n, o);
					(B[Yr() >> 2] = 60 * a), (B[Xr() >> 2] = Number(n != o));
					var i = l(t),
						u = l(r),
						s = V(i),
						c = V(u);
					o < n ? ((B[qr() >> 2] = s), (B[(qr() + 4) >> 2] = c)) : ((B[qr() >> 2] = c), (B[(qr() + 4) >> 2] = s));
				}
				function l(e) {
					var t = e.toTimeString().match(/\(([A-Za-z ]+)\)$/);
					return t ? t[1] : 'GMT';
				}
			}
			function Cr(e) {
				return e % 4 == 0 && (e % 100 != 0 || e % 400 == 0);
			}
			function xr(e, t) {
				for (var r = 0, n = 0; n <= t; r += e[n++]);
				return r;
			}
			var Sr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
				Tr = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
			function Dr(e, t) {
				for (var r = new Date(e.getTime()); t > 0; ) {
					var n = Cr(r.getFullYear()),
						o = r.getMonth(),
						a = (n ? Sr : Tr)[o];
					if (!(t > a - r.getDate())) return r.setDate(r.getDate() + t), r;
					(t -= a - r.getDate() + 1), r.setDate(1), o < 11 ? r.setMonth(o + 1) : (r.setMonth(0), r.setFullYear(r.getFullYear() + 1));
				}
				return r;
			}
			function Pr(e, t, r, n) {
				var o = B[(n + 40) >> 2],
					a = {
						tm_sec: B[n >> 2],
						tm_min: B[(n + 4) >> 2],
						tm_hour: B[(n + 8) >> 2],
						tm_mday: B[(n + 12) >> 2],
						tm_mon: B[(n + 16) >> 2],
						tm_year: B[(n + 20) >> 2],
						tm_wday: B[(n + 24) >> 2],
						tm_yday: B[(n + 28) >> 2],
						tm_isdst: B[(n + 32) >> 2],
						tm_gmtoff: B[(n + 36) >> 2],
						tm_zone: o ? S(o) : ''
					},
					i = S(r),
					u = {
						'%c': '%a %b %d %H:%M:%S %Y',
						'%D': '%m/%d/%y',
						'%F': '%Y-%m-%d',
						'%h': '%b',
						'%r': '%I:%M:%S %p',
						'%R': '%H:%M',
						'%T': '%H:%M:%S',
						'%x': '%m/%d/%y',
						'%X': '%H:%M:%S',
						'%Ec': '%c',
						'%EC': '%C',
						'%Ex': '%m/%d/%y',
						'%EX': '%H:%M:%S',
						'%Ey': '%y',
						'%EY': '%Y',
						'%Od': '%d',
						'%Oe': '%e',
						'%OH': '%H',
						'%OI': '%I',
						'%Om': '%m',
						'%OM': '%M',
						'%OS': '%S',
						'%Ou': '%u',
						'%OU': '%U',
						'%OV': '%V',
						'%Ow': '%w',
						'%OW': '%W',
						'%Oy': '%y'
					};
				for (var s in u) i = i.replace(new RegExp(s, 'g'), u[s]);
				var c = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
					l = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
				function f(e, t, r) {
					for (var n = 'number' == typeof e ? e.toString() : e || ''; n.length < t; ) n = r[0] + n;
					return n;
				}
				function d(e, t) {
					return f(e, t, '0');
				}
				function m(e, t) {
					function r(e) {
						return e < 0 ? -1 : e > 0 ? 1 : 0;
					}
					var n;
					return 0 === (n = r(e.getFullYear() - t.getFullYear())) && 0 === (n = r(e.getMonth() - t.getMonth())) && (n = r(e.getDate() - t.getDate())), n;
				}
				function p(e) {
					switch (e.getDay()) {
						case 0:
							return new Date(e.getFullYear() - 1, 11, 29);
						case 1:
							return e;
						case 2:
							return new Date(e.getFullYear(), 0, 3);
						case 3:
							return new Date(e.getFullYear(), 0, 2);
						case 4:
							return new Date(e.getFullYear(), 0, 1);
						case 5:
							return new Date(e.getFullYear() - 1, 11, 31);
						case 6:
							return new Date(e.getFullYear() - 1, 11, 30);
					}
				}
				function h(e) {
					var t = Dr(new Date(e.tm_year + 1900, 0, 1), e.tm_yday),
						r = new Date(t.getFullYear(), 0, 4),
						n = new Date(t.getFullYear() + 1, 0, 4),
						o = p(r),
						a = p(n);
					return m(o, t) <= 0 ? (m(a, t) <= 0 ? t.getFullYear() + 1 : t.getFullYear()) : t.getFullYear() - 1;
				}
				var v = {
					'%a': function (e) {
						return c[e.tm_wday].substring(0, 3);
					},
					'%A': function (e) {
						return c[e.tm_wday];
					},
					'%b': function (e) {
						return l[e.tm_mon].substring(0, 3);
					},
					'%B': function (e) {
						return l[e.tm_mon];
					},
					'%C': function (e) {
						return d(((e.tm_year + 1900) / 100) | 0, 2);
					},
					'%d': function (e) {
						return d(e.tm_mday, 2);
					},
					'%e': function (e) {
						return f(e.tm_mday, 2, ' ');
					},
					'%g': function (e) {
						return h(e).toString().substring(2);
					},
					'%G': function (e) {
						return h(e);
					},
					'%H': function (e) {
						return d(e.tm_hour, 2);
					},
					'%I': function (e) {
						var t = e.tm_hour;
						return 0 == t ? (t = 12) : t > 12 && (t -= 12), d(t, 2);
					},
					'%j': function (e) {
						return d(e.tm_mday + xr(Cr(e.tm_year + 1900) ? Sr : Tr, e.tm_mon - 1), 3);
					},
					'%m': function (e) {
						return d(e.tm_mon + 1, 2);
					},
					'%M': function (e) {
						return d(e.tm_min, 2);
					},
					'%n': function () {
						return '\n';
					},
					'%p': function (e) {
						return e.tm_hour >= 0 && e.tm_hour < 12 ? 'AM' : 'PM';
					},
					'%S': function (e) {
						return d(e.tm_sec, 2);
					},
					'%t': function () {
						return '\t';
					},
					'%u': function (e) {
						return e.tm_wday || 7;
					},
					'%U': function (e) {
						var t = new Date(e.tm_year + 1900, 0, 1),
							r = 0 === t.getDay() ? t : Dr(t, 7 - t.getDay()),
							n = new Date(e.tm_year + 1900, e.tm_mon, e.tm_mday);
						if (m(r, n) < 0) {
							var o = xr(Cr(n.getFullYear()) ? Sr : Tr, n.getMonth() - 1) - 31,
								a = 31 - r.getDate() + o + n.getDate();
							return d(Math.ceil(a / 7), 2);
						}
						return 0 === m(r, t) ? '01' : '00';
					},
					'%V': function (e) {
						var t,
							r = new Date(e.tm_year + 1900, 0, 4),
							n = new Date(e.tm_year + 1901, 0, 4),
							o = p(r),
							a = p(n),
							i = Dr(new Date(e.tm_year + 1900, 0, 1), e.tm_yday);
						return m(i, o) < 0
							? '53'
							: m(a, i) <= 0
							? '01'
							: ((t = o.getFullYear() < e.tm_year + 1900 ? e.tm_yday + 32 - o.getDate() : e.tm_yday + 1 - o.getDate()), d(Math.ceil(t / 7), 2));
					},
					'%w': function (e) {
						return e.tm_wday;
					},
					'%W': function (e) {
						var t = new Date(e.tm_year, 0, 1),
							r = 1 === t.getDay() ? t : Dr(t, 0 === t.getDay() ? 1 : 7 - t.getDay() + 1),
							n = new Date(e.tm_year + 1900, e.tm_mon, e.tm_mday);
						if (m(r, n) < 0) {
							var o = xr(Cr(n.getFullYear()) ? Sr : Tr, n.getMonth() - 1) - 31,
								a = 31 - r.getDate() + o + n.getDate();
							return d(Math.ceil(a / 7), 2);
						}
						return 0 === m(r, t) ? '01' : '00';
					},
					'%y': function (e) {
						return (e.tm_year + 1900).toString().substring(2);
					},
					'%Y': function (e) {
						return e.tm_year + 1900;
					},
					'%z': function (e) {
						var t = e.tm_gmtoff,
							r = t >= 0;
						return (t = ((t = Math.abs(t) / 60) / 60) * 100 + (t % 60)), (r ? '+' : '-') + String('0000' + t).slice(-4);
					},
					'%Z': function (e) {
						return e.tm_zone;
					},
					'%%': function () {
						return '%';
					}
				};
				for (var s in v) i.includes(s) && (i = i.replace(new RegExp(s, 'g'), v[s](a)));
				var g,
					w,
					y = Ur(i, !1);
				return y.length > t ? 0 : ((g = y), (w = e), A.set(g, w), y.length - 1);
			}
			var Mr,
				Ar = function (e, t, r, n) {
					e || (e = this),
						(this.parent = e),
						(this.mount = e.mount),
						(this.mounted = null),
						(this.id = Me.nextInode++),
						(this.name = t),
						(this.mode = r),
						(this.node_ops = {}),
						(this.stream_ops = {}),
						(this.rdev = n);
				},
				Lr = 365,
				Rr = 146;
			Object.defineProperties(Ar.prototype, {
				read: {
					get: function () {
						return (this.mode & Lr) === Lr;
					},
					set: function (e) {
						e ? (this.mode |= Lr) : (this.mode &= -366);
					}
				},
				write: {
					get: function () {
						return (this.mode & Rr) === Rr;
					},
					set: function (e) {
						e ? (this.mode |= Rr) : (this.mode &= -147);
					}
				},
				isFolder: {
					get: function () {
						return Me.isDir(this.mode);
					}
				},
				isDevice: {
					get: function () {
						return Me.isChrdev(this.mode);
					}
				}
			}),
				(Me.FSNode = Ar),
				Me.staticInit(),
				(e.FS_createPath = Me.createPath),
				(e.FS_createDataFile = Me.createDataFile),
				(e.FS_createPreloadedFile = Me.createPreloadedFile),
				(e.FS_createLazyFile = Me.createLazyFile),
				(e.FS_createDevice = Me.createDevice),
				(e.FS_unlink = Me.unlink),
				(function () {
					for (var e = new Array(256), t = 0; t < 256; ++t) e[t] = String.fromCharCode(t);
					Re = e;
				})(),
				(We = e.BindingError = ze(Error, 'BindingError')),
				($e = e.InternalError = ze(Error, 'InternalError')),
				(ut.prototype.isAliasOf = He),
				(ut.prototype.clone = et),
				(ut.prototype.delete = tt),
				(ut.prototype.isDeleted = rt),
				(ut.prototype.deleteLater = it),
				(Tt.prototype.getPointee = gt),
				(Tt.prototype.destructor = wt),
				(Tt.prototype.argPackAdvance = 8),
				(Tt.prototype.readValueFromPointer = vt),
				(Tt.prototype.deleteObject = yt),
				(Tt.prototype.fromWireType = St),
				(e.getInheritedInstanceCount = _t),
				(e.getLiveInheritedInstances = Et),
				(e.flushPendingDeletes = at),
				(e.setDelayFunction = kt),
				(At = e.UnboundTypeError = ze(Error, 'UnboundTypeError')),
				(e.count_emval_handles = Gt),
				(e.get_first_emval = $t),
				(e.requestFullscreen = function (e, t) {
					ir.requestFullscreen(e, t);
				}),
				(e.requestAnimationFrame = function (e) {
					ir.requestAnimationFrame(e);
				}),
				(e.setCanvasSize = function (e, t, r) {
					ir.setCanvasSize(e, t, r);
				}),
				(e.pauseMainLoop = function () {
					ir.mainLoop.pause();
				}),
				(e.resumeMainLoop = function () {
					ir.mainLoop.resume();
				}),
				(e.getUserMedia = function () {
					ir.getUserMedia();
				}),
				(e.createContext = function (e, t, r, n) {
					return ir.createContext(e, t, r, n);
				});
			for (var Ir = 0; Ir < 32; ++Ir) mr.push(new Array(Ir));
			var Br = new Float32Array(288);
			for (Ir = 0; Ir < 288; ++Ir) _r[Ir] = Br.subarray(0, Ir + 1);
			function Ur(e, t, r) {
				var n = r > 0 ? r : P(e) + 1,
					o = new Array(n),
					a = T(e, o, 0, o.length);
				return t && (o.length = a), o;
			}
			var Or = {
				ab: function () {
					f('missing function: _ZN3bnb13serialization21frame_data_serializer11write_frameERKNS_10frame_dataE'), oe(-1);
				},
				Tb: function () {
					f('missing function: _ZN3bnb13serialization21frame_data_serializer12set_featuresENSt3__26vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEE'), oe(-1);
				},
				Sb: function () {
					f(
						'missing function: _ZN3bnb13serialization21frame_data_serializerC1ERKNSt3__212basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS0_16compression_typeERKNS2_13unordered_mapIS8_S8_NS2_4hashIS8_EENS2_8equal_toIS8_EENS6_INS2_4pairIS9_S8_EEEEEE'
					),
						oe(-1);
				},
				ic: function (e, t) {
					return he(e, t);
				},
				a: function (e) {
					return jr(e + _e) + _e;
				},
				Qb: function () {
					var e = Ee.pop();
					e || oe('no exception to throw');
					var t = e.get_exception_info(),
						r = e.get_base_ptr();
					throw (t.get_rethrown() ? e.free() : (Ee.push(e), t.set_rethrown(!0), t.set_caught(!1)), r);
				},
				wc: function (e, t) {},
				b: function (e, t, r) {
					throw (new ke(e).init(t, r), e);
				},
				fc: function (e, t) {
					return Fe(e, t);
				},
				vb: function (e, t, r) {
					Ae.varargs = r;
					try {
						var n = Ae.getStreamFromFD(e);
						switch (t) {
							case 0:
								return (o = Ae.get()) < 0 ? -28 : Me.open(n.path, n.flags, 0, o).fd;
							case 1:
							case 2:
								return 0;
							case 3:
								return n.flags;
							case 4:
								var o = Ae.get();
								return (n.flags |= o), 0;
							case 12:
								return (o = Ae.get()), (R[(o + 0) >> 1] = 2), 0;
							case 13:
							case 14:
								return 0;
							case 16:
							case 8:
								return -28;
							case 9:
								return pe(28), -1;
							default:
								return -28;
						}
					} catch (a) {
						return (void 0 !== Me && a instanceof Me.ErrnoError) || oe(a), -a.errno;
					}
				},
				hc: function (e, t, r, n) {
					try {
						var o = Ae.get64(r, n);
						return Me.ftruncate(e, o), 0;
					} catch (a) {
						return (void 0 !== Me && a instanceof Me.ErrnoError) || oe(a), -a.errno;
					}
				},
				pc: function (e, t, r) {
					try {
						var n = Ae.getStreamFromFD(e);
						n.getdents || (n.getdents = Me.readdir(n.path));
						for (var o = 280, a = 0, i = Me.llseek(n, 0, 1), u = Math.floor(i / o); u < n.getdents.length && a + o <= r; ) {
							var s,
								c,
								l = n.getdents[u];
							if ('.' === l[0]) (s = 1), (c = 4);
							else {
								var f = Me.lookupNode(n.node, l);
								(s = f.id), (c = Me.isChrdev(f.mode) ? 2 : Me.isDir(f.mode) ? 4 : Me.isLink(f.mode) ? 10 : 8);
							}
							(se = [
								s >>> 0,
								((ue = s), +Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
							]),
								(B[(t + a) >> 2] = se[0]),
								(B[(t + a + 4) >> 2] = se[1]),
								(se = [
									((u + 1) * o) >>> 0,
									((ue = (u + 1) * o),
									+Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
								]),
								(B[(t + a + 8) >> 2] = se[0]),
								(B[(t + a + 12) >> 2] = se[1]),
								(R[(t + a + 16) >> 1] = 280),
								(A[(t + a + 18) >> 0] = c),
								D(l, t + a + 19, 256),
								(a += o),
								(u += 1);
						}
						return Me.llseek(n, u * o, 0), a;
					} catch (d) {
						return (void 0 !== Me && d instanceof Me.ErrnoError) || oe(d), -d.errno;
					}
				},
				gc: function () {
					return 42;
				},
				kc: function (e, t, r) {
					Ae.varargs = r;
					try {
						var n = Ae.getStreamFromFD(e);
						switch (t) {
							case 21509:
							case 21505:
								return n.tty ? 0 : -59;
							case 21510:
							case 21511:
							case 21512:
							case 21506:
							case 21507:
							case 21508:
								return n.tty ? 0 : -59;
							case 21519:
								if (!n.tty) return -59;
								var o = Ae.get();
								return (B[o >> 2] = 0), 0;
							case 21520:
								return n.tty ? -28 : -59;
							case 21531:
								return (o = Ae.get()), Me.ioctl(n, t, o);
							case 21523:
							case 21524:
								return n.tty ? 0 : -59;
							default:
								oe('bad ioctl syscall ' + t);
						}
					} catch (a) {
						return (void 0 !== Me && a instanceof Me.ErrnoError) || oe(a), -a.errno;
					}
				},
				wb: function (e, t) {
					try {
						return (e = Ae.getStr(e)), Ae.doStat(Me.lstat, e, t);
					} catch (r) {
						return (void 0 !== Me && r instanceof Me.ErrnoError) || oe(r), -r.errno;
					}
				},
				lc: function (e, t) {
					try {
						return (e = Ae.getStr(e)), Ae.doMkdir(e, t);
					} catch (r) {
						return (void 0 !== Me && r instanceof Me.ErrnoError) || oe(r), -r.errno;
					}
				},
				oc: function (e, t, r, n, o, a) {
					try {
						return (function (e, t, r, n, o, a) {
							var i;
							a <<= 12;
							var u = !1;
							if (0 != (16 & n) && e % 65536 != 0) return -28;
							if (0 != (32 & n)) {
								if (!(i = Jr(65536, t))) return -48;
								Wr(i, 0, t), (u = !0);
							} else {
								var s = Me.getStream(o);
								if (!s) return -8;
								var c = Me.mmap(s, e, t, a, r, n);
								(i = c.ptr), (u = c.allocated);
							}
							return (Ae.mappings[i] = { malloc: i, len: t, allocated: u, fd: o, prot: r, flags: n, offset: a }), i;
						})(e, t, r, n, o, a);
					} catch (i) {
						return (void 0 !== Me && i instanceof Me.ErrnoError) || oe(i), -i.errno;
					}
				},
				nc: function (e, t) {
					try {
						return (function (e, t) {
							if (-1 == (0 | e) || 0 === t) return -28;
							var r = Ae.mappings[e];
							if (!r) return 0;
							if (t === r.len) {
								var n = Me.getStream(r.fd);
								n && (2 & r.prot && Ae.doMsync(e, n, t, r.flags, r.offset), Me.munmap(n)), (Ae.mappings[e] = null), r.allocated && zr(r.malloc);
							}
							return 0;
						})(e, t);
					} catch (r) {
						return (void 0 !== Me && r instanceof Me.ErrnoError) || oe(r), -r.errno;
					}
				},
				xb: function (e, t, r) {
					Ae.varargs = r;
					try {
						var n = Ae.getStr(e),
							o = r ? Ae.get() : 0;
						return Me.open(n, t, o).fd;
					} catch (a) {
						return (void 0 !== Me && a instanceof Me.ErrnoError) || oe(a), -a.errno;
					}
				},
				mc: function (e, t) {
					try {
						return (e = Ae.getStr(e)), Ae.doStat(Me.stat, e, t);
					} catch (r) {
						return (void 0 !== Me && r instanceof Me.ErrnoError) || oe(r), -r.errno;
					}
				},
				Yb: function (e, t, r, n, o) {},
				sc: function (e, t, r, n, o) {
					var a = Le(r);
					Ye(e, {
						name: (t = Ie(t)),
						fromWireType: function (e) {
							return !!e;
						},
						toWireType: function (e, t) {
							return t ? n : o;
						},
						argPackAdvance: 8,
						readValueFromPointer: function (e) {
							var n;
							if (1 === r) n = A;
							else if (2 === r) n = R;
							else {
								if (4 !== r) throw new TypeError('Unknown boolean type size: ' + t);
								n = B;
							}
							return this.fromWireType(n[e >> a]);
						},
						destructorFunction: null
					});
				},
				Y: function (e, t, r, n, o, a, i, u, s, c, l, f, d) {
					(l = Ie(l)), (a = Mt(o, a)), u && (u = Mt(i, u)), c && (c = Mt(s, c)), (d = Mt(f, d));
					var m = Ne(l);
					lt(m, function () {
						Rt('Cannot construct ' + l + ' due to unbound types', [n]);
					}),
						Xe([e, t, r], n ? [n] : [], function (t) {
							var r, o;
							(t = t[0]), (o = n ? (r = t.registeredClass).instancePrototype : ut.prototype);
							var i = je(m, function () {
									if (Object.getPrototypeOf(this) !== s) throw new We("Use 'new' to construct " + l);
									if (void 0 === f.constructor_body) throw new We(l + ' has no accessible constructor');
									var e = f.constructor_body[arguments.length];
									if (void 0 === e)
										throw new We(
											'Tried to invoke ctor of ' +
												l +
												' with invalid number of parameters (' +
												arguments.length +
												') - expected (' +
												Object.keys(f.constructor_body).toString() +
												') parameters instead!'
										);
									return e.apply(this, arguments);
								}),
								s = Object.create(o, { constructor: { value: i } });
							i.prototype = s;
							var f = new ft(l, i, s, d, r, a, u, c),
								p = new Tt(l, f, !0, !1, !1),
								h = new Tt(l + '*', f, !1, !1, !1),
								v = new Tt(l + ' const*', f, !1, !0, !1);
							return (st[e] = { pointerType: h, constPointerType: v }), Dt(m, i), [p, h, v];
						});
				},
				ga: function (e, t, r, n, o, a, i) {
					var u = Ot(r, n);
					(t = Ie(t)),
						(a = Mt(o, a)),
						Xe([], [e], function (e) {
							var n = (e = e[0]).name + '.' + t;
							function o() {
								Rt('Cannot call ' + n + ' due to unbound types', u);
							}
							var s = e.registeredClass.constructor;
							return (
								void 0 === s[t] ? ((o.argCount = r - 1), (s[t] = o)) : (ct(s, t, n), (s[t].overloadTable[r - 1] = o)),
								Xe([], u, function (e) {
									var o = [e[0], null].concat(e.slice(1)),
										u = Ut(n, o, null, a, i);
									return void 0 === s[t].overloadTable ? ((u.argCount = r - 1), (s[t] = u)) : (s[t].overloadTable[r - 1] = u), [];
								}),
								[]
							);
						});
				},
				ia: function (e, t, r, n, o, a) {
					k(t > 0);
					var i = Ot(t, r);
					o = Mt(n, o);
					var u = [a],
						s = [];
					Xe([], [e], function (e) {
						var r = 'constructor ' + (e = e[0]).name;
						if ((void 0 === e.registeredClass.constructor_body && (e.registeredClass.constructor_body = []), void 0 !== e.registeredClass.constructor_body[t - 1]))
							throw new We(
								'Cannot register multiple constructors with identical number of parameters (' +
									(t - 1) +
									") for class '" +
									e.name +
									"'! Overload resolution is currently only performed using the parameter count, not actual type info!"
							);
						return (
							(e.registeredClass.constructor_body[t - 1] = function () {
								Rt('Cannot construct ' + e.name + ' due to unbound types', i);
							}),
							Xe([], i, function (n) {
								return (
									(e.registeredClass.constructor_body[t - 1] = function () {
										arguments.length !== t - 1 && Ge(r + ' called with ' + arguments.length + ' arguments, expected ' + (t - 1)), (s.length = 0), (u.length = t);
										for (var e = 1; e < t; ++e) u[e] = n[e].toWireType(s, arguments[e - 1]);
										var a = o.apply(null, u);
										return Bt(s), n[0].fromWireType(a);
									}),
									[]
								);
							}),
							[]
						);
					});
				},
				m: function (e, t, r, n, o, a, i, u) {
					var s = Ot(r, n);
					(t = Ie(t)),
						(a = Mt(o, a)),
						Xe([], [e], function (e) {
							var n = (e = e[0]).name + '.' + t;
							function o() {
								Rt('Cannot call ' + n + ' due to unbound types', s);
							}
							u && e.registeredClass.pureVirtualFunctions.push(t);
							var c = e.registeredClass.instancePrototype,
								l = c[t];
							return (
								void 0 === l || (void 0 === l.overloadTable && l.className !== e.name && l.argCount === r - 2)
									? ((o.argCount = r - 2), (o.className = e.name), (c[t] = o))
									: (ct(c, t, n), (c[t].overloadTable[r - 2] = o)),
								Xe([], s, function (o) {
									var u = Ut(n, o, e, a, i);
									return void 0 === c[t].overloadTable ? ((u.argCount = r - 2), (c[t] = u)) : (c[t].overloadTable[r - 2] = u), [];
								}),
								[]
							);
						});
				},
				ea: function (e, t, r, n, o, a, i, u, s, c) {
					(t = Ie(t)),
						(o = Mt(n, o)),
						Xe([], [e], function (e) {
							var n = (e = e[0]).name + '.' + t,
								l = {
									get: function () {
										Rt('Cannot access ' + n + ' due to unbound types', [r, i]);
									},
									enumerable: !0,
									configurable: !0
								};
							return (
								(l.set = s
									? function () {
											Rt('Cannot access ' + n + ' due to unbound types', [r, i]);
									  }
									: function (e) {
											Ge(n + ' is a read-only property');
									  }),
								Object.defineProperty(e.registeredClass.instancePrototype, t, l),
								Xe([], s ? [r, i] : [r], function (r) {
									var i = r[0],
										l = {
											get: function () {
												var t = Nt(this, e, n + ' getter');
												return i.fromWireType(o(a, t));
											},
											enumerable: !0
										};
									if (s) {
										s = Mt(u, s);
										var f = r[1];
										l.set = function (t) {
											var r = Nt(this, e, n + ' setter'),
												o = [];
											s(c, r, f.toWireType(o, t)), Bt(o);
										};
									}
									return Object.defineProperty(e.registeredClass.instancePrototype, t, l), [];
								}),
								[]
							);
						});
				},
				rc: function (e, t) {
					Ye(e, {
						name: (t = Ie(t)),
						fromWireType: function (e) {
							var t = zt[e].value;
							return Wt(e), t;
						},
						toWireType: function (e, t) {
							return qt(t);
						},
						argPackAdvance: 8,
						readValueFromPointer: vt,
						destructorFunction: null
					});
				},
				La: function (e, t, r, n) {
					var o = Le(r);
					function a() {}
					(t = Ie(t)),
						(a.values = {}),
						Ye(e, {
							name: t,
							constructor: a,
							fromWireType: function (e) {
								return this.constructor.values[e];
							},
							toWireType: function (e, t) {
								return t.value;
							},
							argPackAdvance: 8,
							readValueFromPointer: Xt(t, o, n),
							destructorFunction: null
						}),
						lt(t, a);
				},
				r: function (e, t, r) {
					var n = Yt(e, 'enum');
					t = Ie(t);
					var o = n.constructor,
						a = Object.create(n.constructor.prototype, { value: { value: r }, constructor: { value: je(n.name + '_' + t, function () {}) } });
					(o.values[r] = a), (o[t] = a);
				},
				yb: function (e, t, r) {
					var n = Le(r);
					Ye(e, {
						name: (t = Ie(t)),
						fromWireType: function (e) {
							return e;
						},
						toWireType: function (e, t) {
							if ('number' != typeof t && 'boolean' != typeof t) throw new TypeError('Cannot convert "' + Ht(t) + '" to ' + this.name);
							return t;
						},
						argPackAdvance: 8,
						readValueFromPointer: Vt(t, n),
						destructorFunction: null
					});
				},
				Oc: function (e, t, r, n, o, a) {
					var i = Ot(t, r);
					(e = Ie(e)),
						(o = Mt(n, o)),
						lt(
							e,
							function () {
								Rt('Cannot call ' + e + ' due to unbound types', i);
							},
							t - 1
						),
						Xe([], i, function (r) {
							var n = [r[0], null].concat(r.slice(1));
							return Dt(e, Ut(e, n, null, o, a), t - 1), [];
						});
				},
				ra: function (e, t, r, n, o) {
					(t = Ie(t)), -1 === o && (o = 4294967295);
					var a = Le(r),
						i = function (e) {
							return e;
						};
					if (0 === n) {
						var u = 32 - 8 * r;
						i = function (e) {
							return (e << u) >>> u;
						};
					}
					var s = t.includes('unsigned');
					Ye(e, {
						name: t,
						fromWireType: i,
						toWireType: function (e, r) {
							if ('number' != typeof r && 'boolean' != typeof r) throw new TypeError('Cannot convert "' + Ht(r) + '" to ' + this.name);
							if (r < n || r > o)
								throw new TypeError(
									'Passing a number "' + Ht(r) + '" from JS side to C/C++ side to an argument of type "' + t + '", which is outside the valid range [' + n + ', ' + o + ']!'
								);
							return s ? r >>> 0 : 0 | r;
						},
						argPackAdvance: 8,
						readValueFromPointer: Qt(t, a, 0 !== n),
						destructorFunction: null
					});
				},
				ja: function (e, t, r) {
					var n = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array][t];
					function o(e) {
						var t = U,
							r = t[(e >>= 2)],
							o = t[e + 1];
						return new n(M, o, r);
					}
					Ye(e, { name: (r = Ie(r)), fromWireType: o, argPackAdvance: 8, readValueFromPointer: o }, { ignoreDuplicateRegistrations: !0 });
				},
				Ga: function (e, t, r, n, o, a, i, u, s, c, l, f) {
					(r = Ie(r)),
						(a = Mt(o, a)),
						(u = Mt(i, u)),
						(c = Mt(s, c)),
						(f = Mt(l, f)),
						Xe([e], [t], function (e) {
							return (e = e[0]), [new Tt(r, e.registeredClass, !1, !1, !0, e, n, a, u, c, f)];
						});
				},
				zb: function (e, t) {
					var r = 'std::string' === (t = Ie(t));
					Ye(e, {
						name: t,
						fromWireType: function (e) {
							var t,
								n = U[e >> 2];
							if (r)
								for (var o = e + 4, a = 0; a <= n; ++a) {
									var i = e + 4 + a;
									if (a == n || 0 == L[i]) {
										var u = S(o, i - o);
										void 0 === t ? (t = u) : ((t += String.fromCharCode(0)), (t += u)), (o = i + 1);
									}
								}
							else {
								var s = new Array(n);
								for (a = 0; a < n; ++a) s[a] = String.fromCharCode(L[e + 4 + a]);
								t = s.join('');
							}
							return zr(e), t;
						},
						toWireType: function (e, t) {
							t instanceof ArrayBuffer && (t = new Uint8Array(t));
							var n = 'string' == typeof t;
							n || t instanceof Uint8Array || t instanceof Uint8ClampedArray || t instanceof Int8Array || Ge('Cannot pass non-string to std::string');
							var o = (
									r && n
										? function () {
												return P(t);
										  }
										: function () {
												return t.length;
										  }
								)(),
								a = jr(4 + o + 1);
							if (((U[a >> 2] = o), r && n)) D(t, a + 4, o + 1);
							else if (n)
								for (var i = 0; i < o; ++i) {
									var u = t.charCodeAt(i);
									u > 255 && (zr(a), Ge('String has UTF-16 code units that do not fit in 8 bits')), (L[a + 4 + i] = u);
								}
							else for (i = 0; i < o; ++i) L[a + 4 + i] = t[i];
							return null !== e && e.push(zr, a), a;
						},
						argPackAdvance: 8,
						readValueFromPointer: vt,
						destructorFunction: function (e) {
							zr(e);
						}
					});
				},
				db: function (e, t, r) {
					var n, o, a, i, u;
					(r = Ie(r)),
						2 === t
							? ((n = W),
							  (o = G),
							  (i = $),
							  (a = function () {
									return I;
							  }),
							  (u = 1))
							: 4 === t &&
							  ((n = X),
							  (o = Y),
							  (i = H),
							  (a = function () {
									return U;
							  }),
							  (u = 2)),
						Ye(e, {
							name: r,
							fromWireType: function (e) {
								for (var r, o = U[e >> 2], i = a(), s = e + 4, c = 0; c <= o; ++c) {
									var l = e + 4 + c * t;
									if (c == o || 0 == i[l >> u]) {
										var f = n(s, l - s);
										void 0 === r ? (r = f) : ((r += String.fromCharCode(0)), (r += f)), (s = l + t);
									}
								}
								return zr(e), r;
							},
							toWireType: function (e, n) {
								'string' != typeof n && Ge('Cannot pass non-string to C++ string type ' + r);
								var a = i(n),
									s = jr(4 + a + t);
								return (U[s >> 2] = a >> u), o(n, s + 4, a + t), null !== e && e.push(zr, s), s;
							},
							argPackAdvance: 8,
							readValueFromPointer: vt,
							destructorFunction: function (e) {
								zr(e);
							}
						});
				},
				tc: function (e, t) {
					Ye(e, { isVoid: !0, name: (t = Ie(t)), argPackAdvance: 0, fromWireType: function () {}, toWireType: function (e, t) {} });
				},
				xa: function (e, t, r) {
					(e = Kt(e)), (t = Yt(t, 'emval::as'));
					var n = [],
						o = qt(n);
					return (B[r >> 2] = o), t.toWireType(n, e);
				},
				Vb: function (e, t, r, n) {
					e = Kt(e);
					for (var o = Jt(t, r), a = new Array(t), i = 0; i < t; ++i) {
						var u = o[i];
						(a[i] = u.readValueFromPointer(n)), (n += u.argPackAdvance);
					}
					return qt(e.apply(void 0, a));
				},
				sb: function (e, t, r, n) {
					(e = tr[e])((t = Kt(t)), (r = er(r)), null, n);
				},
				q: Wt,
				rb: function (e, t) {
					for (
						var r = Jt(e, t),
							n = r[0],
							o =
								n.name +
								'_$' +
								r
									.slice(1)
									.map(function (e) {
										return e.name;
									})
									.join('_') +
								'$',
							a = ['retType'],
							i = [n],
							u = '',
							s = 0;
						s < e - 1;
						++s
					)
						(u += (0 !== s ? ', ' : '') + 'arg' + s), a.push('argType' + s), i.push(r[1 + s]);
					var c = 'return function ' + Ne('methodCaller_' + o) + '(handle, name, destructors, args) {\n',
						l = 0;
					for (s = 0; s < e - 1; ++s) (c += '    var arg' + s + ' = argType' + s + '.readValueFromPointer(args' + (l ? '+' + l : '') + ');\n'), (l += r[s + 1].argPackAdvance);
					for (c += '    var rv = handle[name](' + u + ');\n', s = 0; s < e - 1; ++s) r[s + 1].deleteObject && (c += '    argType' + s + '.deleteObject(arg' + s + ');\n');
					n.isVoid || (c += '    return retType.toWireType(destructors, rv);\n'), (c += '};\n'), a.push(c);
					var f,
						d,
						m = It(Function, a).apply(null, i);
					return (f = m), (d = tr.length), tr.push(f), d;
				},
				ma: function (e, t) {
					return qt((e = Kt(e))[(t = Kt(t))]);
				},
				ca: function (e) {
					e > 4 && (zt[e].refcount += 1);
				},
				Xb: function (e) {
					return 'number' == typeof (e = Kt(e));
				},
				ya: function (e) {
					return qt(er(e));
				},
				wa: function (e) {
					Bt(zt[e].value), Wt(e);
				},
				$: function (e, t) {
					return qt((e = Yt(e, '_emval_take_value')).readValueFromPointer(t));
				},
				d: function () {
					oe();
				},
				Fc: function (e, t, r, n, o) {
					if (ur.currentCtx) {
						var a = ur.buffers[e];
						if (a)
							if (o <= 0) ur.currentCtx.err = 40963;
							else {
								var i = null;
								try {
									switch (t) {
										case 4352:
											if (n > 0) for (var u = (i = ur.currentCtx.audioCtx.createBuffer(1, n, o)).getChannelData(0), s = 0; s < n; ++s) u[s] = 0.0078125 * L[r++] - 1;
											(a.bytesPerSample = 1), (a.channels = 1), (a.length = n);
											break;
										case 4353:
											if (n > 0)
												for (u = (i = ur.currentCtx.audioCtx.createBuffer(1, n >> 1, o)).getChannelData(0), r >>= 1, s = 0; s < n >> 1; ++s) u[s] = 30517578125e-15 * R[r++];
											(a.bytesPerSample = 2), (a.channels = 1), (a.length = n >> 1);
											break;
										case 4354:
											if (n > 0) {
												u = (i = ur.currentCtx.audioCtx.createBuffer(2, n >> 1, o)).getChannelData(0);
												var c = i.getChannelData(1);
												for (s = 0; s < n >> 1; ++s) (u[s] = 0.0078125 * L[r++] - 1), (c[s] = 0.0078125 * L[r++] - 1);
											}
											(a.bytesPerSample = 1), (a.channels = 2), (a.length = n >> 1);
											break;
										case 4355:
											if (n > 0)
												for (u = (i = ur.currentCtx.audioCtx.createBuffer(2, n >> 2, o)).getChannelData(0), c = i.getChannelData(1), r >>= 1, s = 0; s < n >> 2; ++s)
													(u[s] = 30517578125e-15 * R[r++]), (c[s] = 30517578125e-15 * R[r++]);
											(a.bytesPerSample = 2), (a.channels = 2), (a.length = n >> 2);
											break;
										case 65552:
											if (n > 0) for (u = (i = ur.currentCtx.audioCtx.createBuffer(1, n >> 2, o)).getChannelData(0), r >>= 2, s = 0; s < n >> 2; ++s) u[s] = O[r++];
											(a.bytesPerSample = 4), (a.channels = 1), (a.length = n >> 2);
											break;
										case 65553:
											if (n > 0)
												for (u = (i = ur.currentCtx.audioCtx.createBuffer(2, n >> 3, o)).getChannelData(0), c = i.getChannelData(1), r >>= 2, s = 0; s < n >> 3; ++s)
													(u[s] = O[r++]), (c[s] = O[r++]);
											(a.bytesPerSample = 4), (a.channels = 2), (a.length = n >> 3);
											break;
										default:
											return void (ur.currentCtx.err = 40963);
									}
									(a.frequency = o), (a.audioBuf = i);
								} catch (l) {
									return void (ur.currentCtx.err = 40963);
								}
							}
						else ur.currentCtx.err = 40963;
					}
				},
				Dc: function (e, t) {
					if (ur.currentCtx) {
						for (var r = 0; r < e; ++r)
							if (0 !== (n = B[(t + 4 * r) >> 2])) {
								if (!ur.buffers[n]) return void (ur.currentCtx.err = 40961);
								if (ur.buffers[n].refCount) return void (ur.currentCtx.err = 40964);
							}
						for (r = 0; r < e; ++r) {
							var n;
							0 !== (n = B[(t + 4 * r) >> 2]) && (ur.deviceRefCounts[ur.buffers[n].deviceId]--, delete ur.buffers[n], ur.freeIds.push(n));
						}
					}
				},
				Ec: function (e, t) {
					if (ur.currentCtx) {
						for (var r = 0; r < e; ++r) {
							var n = B[(t + 4 * r) >> 2];
							if (!ur.currentCtx.sources[n]) return void (ur.currentCtx.err = 40961);
						}
						for (r = 0; r < e; ++r) (n = B[(t + 4 * r) >> 2]), ur.setSourceState(ur.currentCtx.sources[n], 4116), sr(n, 4105, 0), delete ur.currentCtx.sources[n], ur.freeIds.push(n);
					}
				},
				Gc: function (e, t) {
					if (ur.currentCtx)
						for (var r = 0; r < e; ++r) {
							var n = { deviceId: ur.currentCtx.deviceId, id: ur.newId(), refCount: 0, audioBuf: null, frequency: 0, bytesPerSample: 2, channels: 1, length: 0 };
							ur.deviceRefCounts[n.deviceId]++, (ur.buffers[n.id] = n), (B[(t + 4 * r) >> 2] = n.id);
						}
				},
				Hc: function (e, t) {
					if (ur.currentCtx)
						for (var r = 0; r < e; ++r) {
							var n = ur.currentCtx.audioCtx.createGain();
							n.connect(ur.currentCtx.gain);
							var o = {
								context: ur.currentCtx,
								id: ur.newId(),
								type: 4144,
								state: 4113,
								bufQueue: [ur.buffers[0]],
								audioQueue: [],
								looping: !1,
								pitch: 1,
								dopplerShift: 1,
								gain: n,
								minGain: 0,
								maxGain: 1,
								panner: null,
								bufsProcessed: 0,
								bufStartTime: Number.NEGATIVE_INFINITY,
								bufOffset: 0,
								relative: !1,
								refDistance: 1,
								maxDistance: 340282e33,
								rolloffFactor: 1,
								position: [0, 0, 0],
								velocity: [0, 0, 0],
								direction: [0, 0, 0],
								coneOuterGain: 0,
								coneInnerAngle: 360,
								coneOuterAngle: 360,
								distanceModel: 53250,
								spatialize: 2,
								get playbackRate() {
									return this.pitch * this.dopplerShift;
								}
							};
							(ur.currentCtx.sources[o.id] = o), (B[(t + 4 * r) >> 2] = o.id);
						}
				},
				ha: function () {
					if (ur.currentCtx) {
						var e = ur.currentCtx.err;
						return (ur.currentCtx.err = 0), e;
					}
					return 40964;
				},
				Gb: function (e, t, r) {
					var n = ur.getSourceParam('alGetSourcei', e, t);
					if (null !== n)
						if (r)
							switch (t) {
								case 514:
								case 4097:
								case 4098:
								case 4103:
								case 4105:
								case 4112:
								case 4117:
								case 4118:
								case 4128:
								case 4129:
								case 4131:
								case 4132:
								case 4133:
								case 4134:
								case 4135:
								case 4628:
								case 8201:
								case 8202:
								case 53248:
									B[r >> 2] = n;
									break;
								default:
									return void (ur.currentCtx.err = 40962);
							}
						else ur.currentCtx.err = 40963;
				},
				aa: function (e) {
					if (!ur.currentCtx) return 0;
					if (ur.stringCache[e]) return ur.stringCache[e];
					var t;
					switch (e) {
						case 0:
							t = 'No Error';
							break;
						case 40961:
							t = 'Invalid Name';
							break;
						case 40962:
							t = 'Invalid Enum';
							break;
						case 40963:
							t = 'Invalid Value';
							break;
						case 40964:
							t = 'Invalid Operation';
							break;
						case 40965:
							t = 'Out of Memory';
							break;
						case 45057:
							t = 'Emscripten';
							break;
						case 45058:
							t = '1.1';
							break;
						case 45059:
							t = 'WebAudio';
							break;
						case 45060:
							for (var r in ((t = ''), ur.AL_EXTENSIONS)) t = (t = t.concat(r)).concat(' ');
							t = t.trim();
							break;
						default:
							return (ur.currentCtx.err = 40962), 0;
					}
					return (t = F(Ur(t), 0)), (ur.stringCache[e] = t), t;
				},
				Ic: function (e) {
					if (ur.currentCtx) {
						var t = ur.currentCtx.sources[e];
						t ? ur.setSourceState(t, 4115) : (ur.currentCtx.err = 40961);
					}
				},
				Hb: function (e) {
					if (ur.currentCtx) {
						var t = ur.currentCtx.sources[e];
						t ? ur.setSourceState(t, 4114) : (ur.currentCtx.err = 40961);
					}
				},
				Jc: function (e) {
					if (ur.currentCtx) {
						var t = ur.currentCtx.sources[e];
						t ? ur.setSourceState(t, 4116) : (ur.currentCtx.err = 40961);
					}
				},
				Fb: function (e, t, r) {
					switch (t) {
						case 4097:
						case 4098:
						case 4099:
						case 4106:
						case 4109:
						case 4110:
						case 4128:
						case 4129:
						case 4130:
						case 4131:
						case 4132:
						case 4133:
						case 4134:
						case 8203:
							ur.setSourceParam('alSourcef', e, t, r);
							break;
						default:
							ur.setSourceParam('alSourcef', e, t, null);
					}
				},
				Ib: sr,
				Kc: function (e) {
					return !(e in ur.deviceRefCounts) || ur.deviceRefCounts[e] > 0 ? 0 : (delete ur.deviceRefCounts[e], ur.freeIds.push(e), 1);
				},
				Nc: function (e, t) {
					if (!(e in ur.deviceRefCounts)) return (ur.alcErr = 40961), 0;
					var r = null,
						n = [],
						o = null;
					if ((t >>= 2))
						for (var a = 0, i = 0; (a = B[t++]), n.push(a), 0 !== a; )
							switch (((i = B[t++]), n.push(i), a)) {
								case 4103:
									r || (r = {}), (r.sampleRate = i);
									break;
								case 4112:
								case 4113:
									break;
								case 6546:
									switch (i) {
										case 0:
											o = !1;
											break;
										case 1:
											o = !0;
											break;
										case 2:
											break;
										default:
											return (ur.alcErr = 40964), 0;
									}
									break;
								case 6550:
									if (0 !== i) return (ur.alcErr = 40964), 0;
									break;
								default:
									return (ur.alcErr = 40964), 0;
							}
					var u = window.AudioContext || window.webkitAudioContext,
						s = null;
					try {
						s = r ? new u(r) : new u();
					} catch (m) {
						return 'NotSupportedError' === m.name ? (ur.alcErr = 40964) : (ur.alcErr = 40961), 0;
					}
					!(function (e, t) {
						t || (t = [document, document.getElementById('canvas')]),
							['keydown', 'mousedown', 'touchstart'].forEach(function (r) {
								t.forEach(function (t) {
									t &&
										(function (e, t, r) {
											e.addEventListener(t, r, { once: !0 });
										})(t, r, function () {
											'suspended' === e.state && e.resume();
										});
								});
							});
					})(s),
						void 0 === s.createGain && (s.createGain = s.createGainNode);
					var c = s.createGain();
					c.connect(s.destination);
					var l = {
						deviceId: e,
						id: ur.newId(),
						attrs: n,
						audioCtx: s,
						listener: { position: [0, 0, 0], velocity: [0, 0, 0], direction: [0, 0, 0], up: [0, 0, 0] },
						sources: [],
						interval: setInterval(function () {
							ur.scheduleContextAudio(l);
						}, ur.QUEUE_INTERVAL),
						gain: c,
						distanceModel: 53250,
						speedOfSound: 343.3,
						dopplerFactor: 1,
						sourceDistanceModel: !1,
						hrtf: o || !1,
						_err: 0,
						get err() {
							return this._err;
						},
						set err(e) {
							(0 !== this._err && 0 !== e) || (this._err = e);
						}
					};
					if ((ur.deviceRefCounts[e]++, (ur.contexts[l.id] = l), null !== o))
						for (var f in ur.contexts) {
							var d = ur.contexts[f];
							d.deviceId === e && ((d.hrtf = o), ur.updateContextGlobal(d));
						}
					return l.id;
				},
				Lc: function (e) {
					var t = ur.contexts[e];
					ur.currentCtx !== t
						? (ur.contexts[e].interval && clearInterval(ur.contexts[e].interval), ur.deviceRefCounts[t.deviceId]--, delete ur.contexts[e], ur.freeIds.push(e))
						: (ur.alcErr = 40962);
				},
				Mc: function (e) {
					var t = ur.alcErr;
					return (ur.alcErr = 0), t;
				},
				Jb: function (e, t) {
					if (ur.alcStringCache[t]) return ur.alcStringCache[t];
					var r;
					switch (t) {
						case 0:
							r = 'No Error';
							break;
						case 40961:
							r = 'Invalid Device';
							break;
						case 40962:
							r = 'Invalid Context';
							break;
						case 40963:
							r = 'Invalid Enum';
							break;
						case 40964:
							r = 'Invalid Value';
							break;
						case 40965:
							r = 'Out of Memory';
							break;
						case 4100:
							if ('undefined' == typeof AudioContext && 'undefined' == typeof webkitAudioContext) return 0;
							r = ur.DEVICE_NAME;
							break;
						case 4101:
							r = 'undefined' != typeof AudioContext || 'undefined' != typeof webkitAudioContext ? ur.DEVICE_NAME.concat('\0') : '\0';
							break;
						case 785:
							r = ur.CAPTURE_DEVICE_NAME;
							break;
						case 784:
							if (0 === e) r = ur.CAPTURE_DEVICE_NAME.concat('\0');
							else {
								var n = ur.requireValidCaptureDevice(e, 'alcGetString');
								if (!n) return 0;
								r = n.deviceName;
							}
							break;
						case 4102:
							if (!e) return (ur.alcErr = 40961), 0;
							for (var o in ((r = ''), ur.ALC_EXTENSIONS)) r = (r = r.concat(o)).concat(' ');
							r = r.trim();
							break;
						default:
							return (ur.alcErr = 40963), 0;
					}
					return (r = F(Ur(r), 0)), (ur.alcStringCache[t] = r), r;
				},
				Kb: function (e) {
					return 0 === e ? ((ur.currentCtx = null), 0) : ((ur.currentCtx = ur.contexts[e]), 1);
				},
				Pc: function (e) {
					if (e && S(e) !== ur.DEVICE_NAME) return 0;
					if ('undefined' != typeof AudioContext || 'undefined' != typeof webkitAudioContext) {
						var t = ur.newId();
						return (ur.deviceRefCounts[t] = 0), t;
					}
					return 0;
				},
				Cc: function () {
					if (e.useCamTexture && e.texture) {
						const t = e.ctx;
						t.bindTexture(t.TEXTURE_2D, e.texture);
					}
				},
				ub: he,
				vc: function (e, t) {
					return e - t;
				},
				Qc: function () {
					oe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking");
				},
				Mb: function (e, t) {
					oe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking");
				},
				s: function (e, t) {
					oe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking");
				},
				qc: function () {
					return 2147483648;
				},
				X: function (e, t) {
					return (function (e, t) {
						throw (Kr(e, t || 1), 'longjmp');
					})(e, t);
				},
				$b: function (e, t, r) {
					L.copyWithin(e, t, t + r);
				},
				bb: function (e) {
					var t,
						r,
						n = L.length,
						o = 2147483648;
					if ((e >>>= 0) > o) return !1;
					for (var a = 1; a <= 4; a *= 2) {
						var i = n * (1 + 0.2 / a);
						if (((i = Math.min(i, e + 100663296)), cr(Math.min(o, ((t = Math.max(e, i)) % (r = 65536) > 0 && (t += r - (t % r)), t))))) return !0;
					}
					return !1;
				},
				ec: function (e) {
					for (var t = ce(); ce() - t < e; );
				},
				cc: function (e, t) {
					try {
						var r = 0;
						return (
							fr().forEach(function (n, o) {
								var a = t + r;
								(B[(e + 4 * o) >> 2] = a),
									(function (e, t, r) {
										for (var n = 0; n < e.length; ++n) A[t++ >> 0] = e.charCodeAt(n);
										r || (A[t >> 0] = 0);
									})(n, a),
									(r += n.length + 1);
							}),
							0
						);
					} catch (n) {
						return (void 0 !== Me && n instanceof Me.ErrnoError) || oe(n), n.errno;
					}
				},
				dc: function (e, t) {
					try {
						var r = fr();
						B[e >> 2] = r.length;
						var n = 0;
						return (
							r.forEach(function (e) {
								n += e.length + 1;
							}),
							(B[t >> 2] = n),
							0
						);
					} catch (o) {
						return (void 0 !== Me && o instanceof Me.ErrnoError) || oe(o), o.errno;
					}
				},
				Ta: function (e) {
					try {
						var t = Ae.getStreamFromFD(e);
						return Me.close(t), 0;
					} catch (r) {
						return (void 0 !== Me && r instanceof Me.ErrnoError) || oe(r), r.errno;
					}
				},
				jc: function (e, t, r, n) {
					try {
						var o = Ae.getStreamFromFD(e),
							a = Ae.doReadv(o, t, r);
						return (B[n >> 2] = a), 0;
					} catch (i) {
						return (void 0 !== Me && i instanceof Me.ErrnoError) || oe(i), i.errno;
					}
				},
				Wb: function (e, t, r, n, o) {
					try {
						var a = Ae.getStreamFromFD(e),
							i = 4294967296 * r + (t >>> 0),
							u = 9007199254740992;
						return i <= -u || i >= u
							? -61
							: (Me.llseek(a, i, n),
							  (se = [
									a.position >>> 0,
									((ue = a.position),
									+Math.abs(ue) >= 1 ? (ue > 0 ? (0 | Math.min(+Math.floor(ue / 4294967296), 4294967295)) >>> 0 : ~~+Math.ceil((ue - +(~~ue >>> 0)) / 4294967296) >>> 0) : 0)
							  ]),
							  (B[o >> 2] = se[0]),
							  (B[(o + 4) >> 2] = se[1]),
							  a.getdents && 0 === i && 0 === n && (a.getdents = null),
							  0);
					} catch (s) {
						return (void 0 !== Me && s instanceof Me.ErrnoError) || oe(s), s.errno;
					}
				},
				cb: function (e, t, r, n) {
					try {
						var o = Ae.getStreamFromFD(e),
							a = Ae.doWritev(o, t, r);
						return (B[n >> 2] = a), 0;
					} catch (i) {
						return (void 0 !== Me && i instanceof Me.ErrnoError) || oe(i), i.errno;
					}
				},
				j: function () {
					return g;
				},
				Ob: function () {
					var e = window.location.hostname,
						t = P(e) + 1,
						r = jr(t);
					return D(e, r, t), r;
				},
				ac: function e(t, r) {
					e.randomDevice || (e.randomDevice = xe());
					for (var n = 0; n < r; n++) A[(t + n) >> 0] = e.randomDevice();
					return 0;
				},
				va: function (e) {
					var t = Date.now();
					return (B[e >> 2] = (t / 1e3) | 0), (B[(e + 4) >> 2] = ((t % 1e3) * 1e3) | 0), 0;
				},
				v: function (e) {
					Mr.activeTexture(e);
				},
				Xa: function (e, t) {
					Mr.attachShader(dr.programs[e], dr.shaders[t]);
				},
				k: function (e, t) {
					35051 == e ? (Mr.currentPixelPackBufferBinding = t) : 35052 == e && (Mr.currentPixelUnpackBufferBinding = t), Mr.bindBuffer(e, dr.buffers[t]);
				},
				Ua: function (e, t, r, n, o) {
					Mr.bindBufferRange(e, t, dr.buffers[r], n, o);
				},
				e: function (e, t) {
					Mr.bindFramebuffer(e, dr.framebuffers[t]);
				},
				O: function (e, t) {
					Mr.bindRenderbuffer(e, dr.renderbuffers[t]);
				},
				f: function (e, t) {
					Mr.bindTexture(e, dr.textures[t]);
				},
				p: function (e) {
					Mr.bindVertexArray(dr.vaos[e]);
				},
				Ca: function (e) {
					Mr.blendEquation(e);
				},
				Ja: function (e, t) {
					Mr.blendFunc(e, t);
				},
				ba: function (e, t, r, n, o, a, i, u, s, c) {
					Mr.blitFramebuffer(e, t, r, n, o, a, i, u, s, c);
				},
				U: function (e, t, r, n) {
					dr.currentContext.version >= 2 ? (r ? Mr.bufferData(e, L, n, r, t) : Mr.bufferData(e, t, n)) : Mr.bufferData(e, r ? L.subarray(r, r + t) : t, n);
				},
				la: function (e, t, r, n) {
					dr.currentContext.version >= 2 ? Mr.bufferSubData(e, t, L, n, r) : Mr.bufferSubData(e, t, L.subarray(n, n + r));
				},
				yc: function (e) {
					return Mr.checkFramebufferStatus(e);
				},
				ka: function (e) {
					Mr.clear(e);
				},
				P: function (e, t, r) {
					Mr.clearBufferfv(e, t, O, r >> 2);
				},
				Uc: function (e, t, r, n) {
					Mr.clearColor(e, t, r, n);
				},
				Va: function (e) {
					Mr.clearDepth(e);
				},
				pa: function (e, t, r, n) {
					Mr.colorMask(!!e, !!t, !!r, !!n);
				},
				Ya: function (e) {
					Mr.compileShader(dr.shaders[e]);
				},
				za: function (e, t, r, n, o, a, i, u, s) {
					dr.currentContext.version >= 2
						? Mr.currentPixelUnpackBufferBinding
							? Mr.compressedTexSubImage2D(e, t, r, n, o, a, i, u, s)
							: Mr.compressedTexSubImage2D(e, t, r, n, o, a, i, L, s, u)
						: Mr.compressedTexSubImage2D(e, t, r, n, o, a, i, s ? L.subarray(s, s + u) : null);
				},
				Bb: function (e, t, r, n, o, a, i, u, s, c, l) {
					Mr.currentPixelUnpackBufferBinding ? Mr.compressedTexSubImage3D(e, t, r, n, o, a, i, u, s, c, l) : Mr.compressedTexSubImage3D(e, t, r, n, o, a, i, u, s, L, l, c);
				},
				Rc: function (e, t, r, n, o, a, i, u) {
					Mr.copyTexSubImage2D(e, t, r, n, o, a, i, u);
				},
				nb: function () {
					var e = dr.getNewId(dr.programs),
						t = Mr.createProgram();
					return (t.name = e), (t.maxUniformLength = t.maxAttributeLength = t.maxUniformBlockNameLength = 0), (t.uniformIdCounter = 1), (dr.programs[e] = t), e;
				},
				_a: function (e) {
					var t = dr.getNewId(dr.shaders);
					return (dr.shaders[t] = Mr.createShader(e)), t;
				},
				J: function (e, t) {
					for (var r = 0; r < e; r++) {
						var n = B[(t + 4 * r) >> 2],
							o = dr.buffers[n];
						o &&
							(Mr.deleteBuffer(o),
							(o.name = 0),
							(dr.buffers[n] = null),
							n == Mr.currentPixelPackBufferBinding && (Mr.currentPixelPackBufferBinding = 0),
							n == Mr.currentPixelUnpackBufferBinding && (Mr.currentPixelUnpackBufferBinding = 0));
					}
				},
				h: function (e, t) {
					for (var r = 0; r < e; ++r) {
						var n = B[(t + 4 * r) >> 2],
							o = dr.framebuffers[n];
						o && (Mr.deleteFramebuffer(o), (o.name = 0), (dr.framebuffers[n] = null));
					}
				},
				n: function (e) {
					if (e) {
						var t = dr.programs[e];
						t ? (Mr.deleteProgram(t), (t.name = 0), (dr.programs[e] = null)) : dr.recordError(1281);
					}
				},
				E: function (e, t) {
					for (var r = 0; r < e; r++) {
						var n = B[(t + 4 * r) >> 2],
							o = dr.renderbuffers[n];
						o && (Mr.deleteRenderbuffer(o), (o.name = 0), (dr.renderbuffers[n] = null));
					}
				},
				Da: function (e) {
					if (e) {
						var t = dr.shaders[e];
						t ? (Mr.deleteShader(t), (dr.shaders[e] = null)) : dr.recordError(1281);
					}
				},
				g: function (e, t) {
					for (var r = 0; r < e; r++) {
						var n = B[(t + 4 * r) >> 2],
							o = dr.textures[n];
						o && (Mr.deleteTexture(o), (o.name = 0), (dr.textures[n] = null));
					}
				},
				L: function (e, t) {
					for (var r = 0; r < e; r++) {
						var n = B[(t + 4 * r) >> 2];
						Mr.deleteVertexArray(dr.vaos[n]), (dr.vaos[n] = null);
					}
				},
				Fa: function (e) {
					Mr.depthFunc(e);
				},
				Q: function (e) {
					Mr.depthMask(!!e);
				},
				u: function (e) {
					Mr.disable(e);
				},
				R: function (e, t, r) {
					Mr.drawArrays(e, t, r);
				},
				zc: function (e, t, r, n) {
					Mr.drawArraysInstanced(e, t, r, n);
				},
				kb: function (e, t) {
					for (var r = mr[e], n = 0; n < e; n++) r[n] = B[(t + 4 * n) >> 2];
					Mr.drawBuffers(r);
				},
				M: function (e, t, r, n) {
					Mr.drawElements(e, t, r, n);
				},
				T: function (e, t, r, n, o) {
					Mr.drawElementsInstanced(e, t, r, n, o);
				},
				I: function (e) {
					Mr.enable(e);
				},
				G: function (e) {
					Mr.enableVertexAttribArray(e);
				},
				S: function (e, t, r, n) {
					Mr.framebufferRenderbuffer(e, t, r, dr.renderbuffers[n]);
				},
				N: function (e, t, r, n, o) {
					Mr.framebufferTexture2D(e, t, r, dr.textures[n], o);
				},
				ua: function (e, t, r, n, o) {
					Mr.framebufferTextureLayer(e, t, dr.textures[r], n, o);
				},
				Pa: function (e) {
					Mr.frontFace(e);
				},
				V: function (e, t) {
					pr(e, t, 'createBuffer', dr.buffers);
				},
				z: function (e, t) {
					pr(e, t, 'createFramebuffer', dr.framebuffers);
				},
				Z: function (e, t) {
					pr(e, t, 'createRenderbuffer', dr.renderbuffers);
				},
				A: function (e, t) {
					pr(e, t, 'createTexture', dr.textures);
				},
				_: function (e, t) {
					pr(e, t, 'createVertexArray', dr.vaos);
				},
				ib: function (e) {
					Mr.generateMipmap(e);
				},
				Sc: function (e, t, r, n, o, a, i) {
					!(function (e, t, r, n, o, a, i, u) {
						t = dr.programs[t];
						var s = Mr[e](t, r);
						if (s) {
							var c = u && D(s.name, u, n);
							o && (B[o >> 2] = c), a && (B[a >> 2] = s.size), i && (B[i >> 2] = s.type);
						}
					})('getActiveUniform', e, t, r, n, o, a, i);
				},
				Nb: function () {
					var e = Mr.getError() || dr.lastError;
					return (dr.lastError = 0), e;
				},
				t: function (e, t) {
					hr(e, t, 0);
				},
				Db: function (e, t, r, n, o) {
					if (n < 0) dr.recordError(1281);
					else if (o) {
						var a = Mr.getInternalformatParameter(e, t, r);
						if (null !== a) for (var i = 0; i < a.length && i < n; ++i) B[(o + i) >> 2] = a[i];
					} else dr.recordError(1281);
				},
				lb: function (e, t, r, n) {
					var o = Mr.getProgramInfoLog(dr.programs[e]);
					null === o && (o = '(unknown error)');
					var a = t > 0 && n ? D(o, n, t) : 0;
					r && (B[r >> 2] = a);
				},
				Ka: function (e, t, r) {
					if (r)
						if (e >= dr.counter) dr.recordError(1281);
						else if (((e = dr.programs[e]), 35716 == t)) {
							var n = Mr.getProgramInfoLog(e);
							null === n && (n = '(unknown error)'), (B[r >> 2] = n.length + 1);
						} else if (35719 == t) {
							if (!e.maxUniformLength)
								for (var o = 0; o < Mr.getProgramParameter(e, 35718); ++o) e.maxUniformLength = Math.max(e.maxUniformLength, Mr.getActiveUniform(e, o).name.length + 1);
							B[r >> 2] = e.maxUniformLength;
						} else if (35722 == t) {
							if (!e.maxAttributeLength)
								for (o = 0; o < Mr.getProgramParameter(e, 35721); ++o) e.maxAttributeLength = Math.max(e.maxAttributeLength, Mr.getActiveAttrib(e, o).name.length + 1);
							B[r >> 2] = e.maxAttributeLength;
						} else if (35381 == t) {
							if (!e.maxUniformBlockNameLength)
								for (o = 0; o < Mr.getProgramParameter(e, 35382); ++o)
									e.maxUniformBlockNameLength = Math.max(e.maxUniformBlockNameLength, Mr.getActiveUniformBlockName(e, o).length + 1);
							B[r >> 2] = e.maxUniformBlockNameLength;
						} else B[r >> 2] = Mr.getProgramParameter(e, t);
					else dr.recordError(1281);
				},
				Wa: function (e, t, r, n) {
					var o = Mr.getShaderInfoLog(dr.shaders[e]);
					null === o && (o = '(unknown error)');
					var a = t > 0 && n ? D(o, n, t) : 0;
					r && (B[r >> 2] = a);
				},
				Oa: function (e, t, r) {
					if (r)
						if (35716 == t) {
							var n = Mr.getShaderInfoLog(dr.shaders[e]);
							null === n && (n = '(unknown error)');
							var o = n ? n.length + 1 : 0;
							B[r >> 2] = o;
						} else if (35720 == t) {
							var a = Mr.getShaderSource(dr.shaders[e]),
								i = a ? a.length + 1 : 0;
							B[r >> 2] = i;
						} else B[r >> 2] = Mr.getShaderParameter(dr.shaders[e], t);
					else dr.recordError(1281);
				},
				oa: function (e, t) {
					return Mr.getUniformBlockIndex(dr.programs[e], S(t));
				},
				l: function (e, t) {
					function r(e) {
						return ']' == e.slice(-1) && e.lastIndexOf('[');
					}
					t = S(t);
					var n,
						o,
						a = (e = dr.programs[e]).uniformLocsById,
						i = e.uniformSizeAndIdsByName,
						u = 0,
						s = t,
						c = r(t);
					if (!a)
						for (e.uniformLocsById = a = {}, e.uniformArrayNamesById = {}, n = 0; n < Mr.getProgramParameter(e, 35718); ++n) {
							var l = Mr.getActiveUniform(e, n),
								f = l.name,
								d = l.size,
								m = r(f),
								p = m > 0 ? f.slice(0, m) : f,
								h = e.uniformIdCounter;
							for (e.uniformIdCounter += d, i[p] = [d, h], o = 0; o < d; ++o) (a[h] = o), (e.uniformArrayNamesById[h++] = p);
						}
					c > 0 && ((u = vr(t.slice(c + 1)) >>> 0), (s = t.slice(0, c)));
					var v = i[s];
					return v && u < v[0] && (a[(u += v[1])] = a[u] || Mr.getUniformLocation(e, t)) ? u : -1;
				},
				F: function (e, t, r) {
					for (var n = mr[t], o = 0; o < t; o++) n[o] = B[(r + 4 * o) >> 2];
					Mr.invalidateFramebuffer(e, n);
				},
				mb: function (e) {
					(e = dr.programs[e]), Mr.linkProgram(e), (e.uniformLocsById = 0), (e.uniformSizeAndIdsByName = {});
				},
				Bc: function () {
					f('missing function: glMapBufferRange'), oe(-1);
				},
				y: function (e, t) {
					3317 == e && (dr.unpackAlignment = t), Mr.pixelStorei(e, t);
				},
				Pb: function (e) {
					Mr.readBuffer(e);
				},
				qa: function (e, t, r, n, o, a, i) {
					if (dr.currentContext.version >= 2)
						if (Mr.currentPixelPackBufferBinding) Mr.readPixels(e, t, r, n, o, a, i);
						else {
							var u = gr(a);
							Mr.readPixels(e, t, r, n, o, a, u, i >> wr(u));
						}
					else {
						var s = yr(a, o, r, n, i);
						s ? Mr.readPixels(e, t, r, n, o, a, s) : dr.recordError(1280);
					}
				},
				da: function (e, t, r, n) {
					Mr.renderbufferStorage(e, t, r, n);
				},
				ta: function (e, t, r, n, o) {
					Mr.renderbufferStorageMultisample(e, t, r, n, o);
				},
				Qa: function (e, t, r, n) {
					Mr.scissor(e, t, r, n);
				},
				Za: function (e, t, r, n) {
					var o = dr.getSource(e, t, r, n);
					Mr.shaderSource(dr.shaders[e], o);
				},
				na: function (e, t, r, n, o, a, i, u, s) {
					if (dr.currentContext.version >= 2)
						if (Mr.currentPixelUnpackBufferBinding) Mr.texImage2D(e, t, r, n, o, a, i, u, s);
						else if (s) {
							var c = gr(u);
							Mr.texImage2D(e, t, r, n, o, a, i, u, c, s >> wr(c));
						} else Mr.texImage2D(e, t, r, n, o, a, i, u, null);
					else Mr.texImage2D(e, t, r, n, o, a, i, u, s ? yr(u, i, n, o, s) : null);
				},
				c: function (e, t, r) {
					Mr.texParameteri(e, t, r);
				},
				D: function (e, t, r, n, o) {
					Mr.texStorage2D(e, t, r, n, o);
				},
				Ha: function (e, t, r, n, o, a) {
					Mr.texStorage3D(e, t, r, n, o, a);
				},
				C: function (e, t, r, n, o, a, i, u, s) {
					if (dr.currentContext.version >= 2)
						if (Mr.currentPixelUnpackBufferBinding) Mr.texSubImage2D(e, t, r, n, o, a, i, u, s);
						else if (s) {
							var c = gr(u);
							Mr.texSubImage2D(e, t, r, n, o, a, i, u, c, s >> wr(c));
						} else Mr.texSubImage2D(e, t, r, n, o, a, i, u, null);
					else {
						var l = null;
						s && (l = yr(u, i, o, a, s)), Mr.texSubImage2D(e, t, r, n, o, a, i, u, l);
					}
				},
				Ia: function (e, t, r, n, o, a, i, u, s, c, l) {
					if (Mr.currentPixelUnpackBufferBinding) Mr.texSubImage3D(e, t, r, n, o, a, i, u, s, c, l);
					else if (l) {
						var f = gr(c);
						Mr.texSubImage3D(e, t, r, n, o, a, i, u, s, c, f, l >> wr(f));
					} else Mr.texSubImage3D(e, t, r, n, o, a, i, u, s, c, null);
				},
				jb: function (e, t) {
					Mr.uniform1f(br(e), t);
				},
				w: function (e, t) {
					Mr.uniform1i(br(e), t);
				},
				eb: function (e, t) {
					Mr.uniform1ui(br(e), t);
				},
				hb: function (e, t, r) {
					Mr.uniform2f(br(e), t, r);
				},
				fb: function (e, t, r) {
					if (dr.currentContext.version >= 2) Mr.uniform2fv(br(e), O, r >> 2, 2 * t);
					else {
						if (t <= 144) for (var n = _r[2 * t - 1], o = 0; o < 2 * t; o += 2) (n[o] = O[(r + 4 * o) >> 2]), (n[o + 1] = O[(r + (4 * o + 4)) >> 2]);
						else n = O.subarray(r >> 2, (r + 8 * t) >> 2);
						Mr.uniform2fv(br(e), n);
					}
				},
				Eb: function (e, t, r, n) {
					Mr.uniform3f(br(e), t, r, n);
				},
				Ea: function (e, t, r) {
					if (dr.currentContext.version >= 2) Mr.uniform3fv(br(e), O, r >> 2, 3 * t);
					else {
						if (t <= 96) for (var n = _r[3 * t - 1], o = 0; o < 3 * t; o += 3) (n[o] = O[(r + 4 * o) >> 2]), (n[o + 1] = O[(r + (4 * o + 4)) >> 2]), (n[o + 2] = O[(r + (4 * o + 8)) >> 2]);
						else n = O.subarray(r >> 2, (r + 12 * t) >> 2);
						Mr.uniform3fv(br(e), n);
					}
				},
				B: function (e, t, r) {
					if (dr.currentContext.version >= 2) Mr.uniform4fv(br(e), O, r >> 2, 4 * t);
					else {
						if (t <= 72) {
							var n = _r[4 * t - 1],
								o = O;
							r >>= 2;
							for (var a = 0; a < 4 * t; a += 4) {
								var i = r + a;
								(n[a] = o[i]), (n[a + 1] = o[i + 1]), (n[a + 2] = o[i + 2]), (n[a + 3] = o[i + 3]);
							}
						} else n = O.subarray(r >> 2, (r + 16 * t) >> 2);
						Mr.uniform4fv(br(e), n);
					}
				},
				sa: function (e, t, r) {
					(e = dr.programs[e]), Mr.uniformBlockBinding(e, t, r);
				},
				Tc: function (e, t, r, n) {
					if (dr.currentContext.version >= 2) Mr.uniformMatrix2fv(br(e), !!r, O, n >> 2, 4 * t);
					else {
						if (t <= 72)
							for (var o = _r[4 * t - 1], a = 0; a < 4 * t; a += 4)
								(o[a] = O[(n + 4 * a) >> 2]), (o[a + 1] = O[(n + (4 * a + 4)) >> 2]), (o[a + 2] = O[(n + (4 * a + 8)) >> 2]), (o[a + 3] = O[(n + (4 * a + 12)) >> 2]);
						else o = O.subarray(n >> 2, (n + 16 * t) >> 2);
						Mr.uniformMatrix2fv(br(e), !!r, o);
					}
				},
				gb: function (e, t, r, n) {
					if (dr.currentContext.version >= 2) Mr.uniformMatrix3fv(br(e), !!r, O, n >> 2, 9 * t);
					else {
						if (t <= 32)
							for (var o = _r[9 * t - 1], a = 0; a < 9 * t; a += 9)
								(o[a] = O[(n + 4 * a) >> 2]),
									(o[a + 1] = O[(n + (4 * a + 4)) >> 2]),
									(o[a + 2] = O[(n + (4 * a + 8)) >> 2]),
									(o[a + 3] = O[(n + (4 * a + 12)) >> 2]),
									(o[a + 4] = O[(n + (4 * a + 16)) >> 2]),
									(o[a + 5] = O[(n + (4 * a + 20)) >> 2]),
									(o[a + 6] = O[(n + (4 * a + 24)) >> 2]),
									(o[a + 7] = O[(n + (4 * a + 28)) >> 2]),
									(o[a + 8] = O[(n + (4 * a + 32)) >> 2]);
						else o = O.subarray(n >> 2, (n + 36 * t) >> 2);
						Mr.uniformMatrix3fv(br(e), !!r, o);
					}
				},
				ob: function (e, t, r, n) {
					if (dr.currentContext.version >= 2) Mr.uniformMatrix4fv(br(e), !!r, O, n >> 2, 16 * t);
					else {
						if (t <= 18) {
							var o = _r[16 * t - 1],
								a = O;
							n >>= 2;
							for (var i = 0; i < 16 * t; i += 16) {
								var u = n + i;
								(o[i] = a[u]),
									(o[i + 1] = a[u + 1]),
									(o[i + 2] = a[u + 2]),
									(o[i + 3] = a[u + 3]),
									(o[i + 4] = a[u + 4]),
									(o[i + 5] = a[u + 5]),
									(o[i + 6] = a[u + 6]),
									(o[i + 7] = a[u + 7]),
									(o[i + 8] = a[u + 8]),
									(o[i + 9] = a[u + 9]),
									(o[i + 10] = a[u + 10]),
									(o[i + 11] = a[u + 11]),
									(o[i + 12] = a[u + 12]),
									(o[i + 13] = a[u + 13]),
									(o[i + 14] = a[u + 14]),
									(o[i + 15] = a[u + 15]);
							}
						} else o = O.subarray(n >> 2, (n + 64 * t) >> 2);
						Mr.uniformMatrix4fv(br(e), !!r, o);
					}
				},
				Ac: function () {
					f('missing function: glUnmapBuffer'), oe(-1);
				},
				o: function (e) {
					(e = dr.programs[e]), Mr.useProgram(e), (Mr.currentProgram = e);
				},
				Vc: function (e, t, r, n, o) {
					Mr.vertexAttribIPointer(e, t, r, n, o);
				},
				H: function (e, t, r, n, o, a) {
					Mr.vertexAttribPointer(e, t, r, !!n, o, a);
				},
				K: function (e, t, r, n) {
					Mr.viewport(e, t, r, n);
				},
				Ub: function (e, t, r, n, o) {
					return kr.createWindow(e, t, r, n, o);
				},
				pb: function (e) {
					return kr.destroyWindow(e);
				},
				Wc: function () {
					return (
						kr.windows ||
							((kr.initialTime = kr.getTime()),
							(kr.hints = kr.defaultHints),
							(kr.windows = new Array()),
							(kr.active = null),
							window.addEventListener('gamepadconnected', kr.onGamepadConnected, !0),
							window.addEventListener('gamepaddisconnected', kr.onGamepadDisconnected, !0),
							window.addEventListener('keydown', kr.onKeydown, !0),
							window.addEventListener('keypress', kr.onKeyPress, !0),
							window.addEventListener('keyup', kr.onKeyup, !0),
							window.addEventListener('blur', kr.onBlur, !0),
							e.canvas.addEventListener('touchmove', kr.onMousemove, !0),
							e.canvas.addEventListener('touchstart', kr.onMouseButtonDown, !0),
							e.canvas.addEventListener('touchcancel', kr.onMouseButtonUp, !0),
							e.canvas.addEventListener('touchend', kr.onMouseButtonUp, !0),
							e.canvas.addEventListener('mousemove', kr.onMousemove, !0),
							e.canvas.addEventListener('mousedown', kr.onMouseButtonDown, !0),
							e.canvas.addEventListener('mouseup', kr.onMouseButtonUp, !0),
							e.canvas.addEventListener('wheel', kr.onMouseWheel, !0),
							e.canvas.addEventListener('mousewheel', kr.onMouseWheel, !0),
							e.canvas.addEventListener('mouseenter', kr.onMouseenter, !0),
							e.canvas.addEventListener('mouseleave', kr.onMouseleave, !0),
							e.canvas.addEventListener('drop', kr.onDrop, !0),
							e.canvas.addEventListener('dragover', kr.onDragover, !0),
							ir.resizeListeners.push(function (e, t) {
								kr.onCanvasResize(e, t);
							})),
						1
					);
				},
				$a: function (e) {},
				Rb: function (e, t, r) {
					kr.setWindowSize(e, t, r);
				},
				tb: function () {
					window.removeEventListener('gamepadconnected', kr.onGamepadConnected, !0),
						window.removeEventListener('gamepaddisconnected', kr.onGamepadDisconnected, !0),
						window.removeEventListener('keydown', kr.onKeydown, !0),
						window.removeEventListener('keypress', kr.onKeyPress, !0),
						window.removeEventListener('keyup', kr.onKeyup, !0),
						window.removeEventListener('blur', kr.onBlur, !0),
						e.canvas.removeEventListener('touchmove', kr.onMousemove, !0),
						e.canvas.removeEventListener('touchstart', kr.onMouseButtonDown, !0),
						e.canvas.removeEventListener('touchcancel', kr.onMouseButtonUp, !0),
						e.canvas.removeEventListener('touchend', kr.onMouseButtonUp, !0),
						e.canvas.removeEventListener('mousemove', kr.onMousemove, !0),
						e.canvas.removeEventListener('mousedown', kr.onMouseButtonDown, !0),
						e.canvas.removeEventListener('mouseup', kr.onMouseButtonUp, !0),
						e.canvas.removeEventListener('wheel', kr.onMouseWheel, !0),
						e.canvas.removeEventListener('mousewheel', kr.onMouseWheel, !0),
						e.canvas.removeEventListener('mouseenter', kr.onMouseenter, !0),
						e.canvas.removeEventListener('mouseleave', kr.onMouseleave, !0),
						e.canvas.removeEventListener('drop', kr.onDrop, !0),
						e.canvas.removeEventListener('dragover', kr.onDragover, !0),
						(e.canvas.width = e.canvas.height = 1),
						(kr.windows = null),
						(kr.active = null);
				},
				Ba: function (e, t) {
					kr.hints[e] = t;
				},
				Ab: Fe,
				fa: function (e, t, r) {
					var n = Hr();
					try {
						return j.get(e)(t, r);
					} catch (o) {
						if ((Vr(n), o !== o + 0 && 'longjmp' !== o)) throw o;
						Kr(1, 0);
					}
				},
				Zb: function (e, t, r, n) {
					var o = Hr();
					try {
						return j.get(e)(t, r, n);
					} catch (a) {
						if ((Vr(o), a !== a + 0 && 'longjmp' !== a)) throw a;
						Kr(1, 0);
					}
				},
				W: function (e, t) {
					var r = Hr();
					try {
						j.get(e)(t);
					} catch (n) {
						if ((Vr(r), n !== n + 0 && 'longjmp' !== n)) throw n;
						Kr(1, 0);
					}
				},
				x: function (e, t, r) {
					var n = Hr();
					try {
						j.get(e)(t, r);
					} catch (o) {
						if ((Vr(n), o !== o + 0 && 'longjmp' !== o)) throw o;
						Kr(1, 0);
					}
				},
				Sa: function (e, t, r, n) {
					var o = Hr();
					try {
						j.get(e)(t, r, n);
					} catch (a) {
						if ((Vr(o), a !== a + 0 && 'longjmp' !== a)) throw a;
						Kr(1, 0);
					}
				},
				Ma: function (e, t, r, n, o) {
					var a = Hr();
					try {
						j.get(e)(t, r, n, o);
					} catch (i) {
						if ((Vr(a), i !== i + 0 && 'longjmp' !== i)) throw i;
						Kr(1, 0);
					}
				},
				_b: function (e, t, r, n, o, a) {
					var i = Hr();
					try {
						j.get(e)(t, r, n, o, a);
					} catch (u) {
						if ((Vr(i), u !== u + 0 && 'longjmp' !== u)) throw u;
						Kr(1, 0);
					}
				},
				Ra: function (e, t) {
					Fr();
					var r = new Date(1e3 * B[e >> 2]);
					(B[t >> 2] = r.getSeconds()),
						(B[(t + 4) >> 2] = r.getMinutes()),
						(B[(t + 8) >> 2] = r.getHours()),
						(B[(t + 12) >> 2] = r.getDate()),
						(B[(t + 16) >> 2] = r.getMonth()),
						(B[(t + 20) >> 2] = r.getFullYear() - 1900),
						(B[(t + 24) >> 2] = r.getDay());
					var n = new Date(r.getFullYear(), 0, 1),
						o = ((r.getTime() - n.getTime()) / 864e5) | 0;
					(B[(t + 28) >> 2] = o), (B[(t + 36) >> 2] = -60 * r.getTimezoneOffset());
					var a = new Date(r.getFullYear(), 6, 1).getTimezoneOffset(),
						i = n.getTimezoneOffset(),
						u = 0 | (a != i && r.getTimezoneOffset() == Math.min(i, a));
					B[(t + 32) >> 2] = u;
					var s = B[(qr() + (u ? 4 : 0)) >> 2];
					return (B[(t + 40) >> 2] = s), t;
				},
				Aa: function (e) {
					Fr();
					var t = new Date(B[(e + 20) >> 2] + 1900, B[(e + 16) >> 2], B[(e + 12) >> 2], B[(e + 8) >> 2], B[(e + 4) >> 2], B[e >> 2], 0),
						r = B[(e + 32) >> 2],
						n = t.getTimezoneOffset(),
						o = new Date(t.getFullYear(), 0, 1),
						a = new Date(t.getFullYear(), 6, 1).getTimezoneOffset(),
						i = o.getTimezoneOffset(),
						u = Math.min(i, a);
					if (r < 0) B[(e + 32) >> 2] = Number(a != i && u == n);
					else if (r > 0 != (u == n)) {
						var s = Math.max(i, a),
							c = r > 0 ? u : s;
						t.setTime(t.getTime() + 6e4 * (c - n));
					}
					B[(e + 24) >> 2] = t.getDay();
					var l = ((t.getTime() - o.getTime()) / 864e5) | 0;
					return (
						(B[(e + 28) >> 2] = l),
						(B[e >> 2] = t.getSeconds()),
						(B[(e + 4) >> 2] = t.getMinutes()),
						(B[(e + 8) >> 2] = t.getHours()),
						(B[(e + 12) >> 2] = t.getDate()),
						(B[(e + 16) >> 2] = t.getMonth()),
						(t.getTime() / 1e3) | 0
					);
				},
				Na: function () {
					return 6;
				},
				Lb: function () {
					return 28;
				},
				i: function (e) {
					g = e;
				},
				xc: Pr,
				bc: function (e, t, r, n) {
					return Pr(e, t, r, n);
				},
				uc: function (e, t, r) {
					for (var n = S(t), o = '\\!@#$^&*()+=-[]/{}|:<>?,.', a = 0, i = o.length; a < i; ++a) n = n.replace(new RegExp('\\' + o[a], 'g'), '\\' + o[a]);
					var u = {
						'%A': '%a',
						'%B': '%b',
						'%c': '%a %b %d %H:%M:%S %Y',
						'%D': '%m\\/%d\\/%y',
						'%e': '%d',
						'%F': '%Y-%m-%d',
						'%h': '%b',
						'%R': '%H\\:%M',
						'%r': '%I\\:%M\\:%S\\s%p',
						'%T': '%H\\:%M\\:%S',
						'%x': '%m\\/%d\\/(?:%y|%Y)',
						'%X': '%H\\:%M\\:%S'
					};
					for (var s in u) n = n.replace(s, u[s]);
					var c = {
						'%a': '(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)',
						'%b': '(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)',
						'%C': '\\d\\d',
						'%d': '0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31',
						'%H': '\\d(?!\\d)|[0,1]\\d|20|21|22|23',
						'%I': '\\d(?!\\d)|0\\d|10|11|12',
						'%j': '00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d',
						'%m': '0[1-9]|[1-9](?!\\d)|10|11|12',
						'%M': '0\\d|\\d(?!\\d)|[1-5]\\d',
						'%n': '\\s',
						'%p': 'AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.',
						'%S': '0\\d|\\d(?!\\d)|[1-5]\\d|60',
						'%U': '0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53',
						'%W': '0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53',
						'%w': '[0-6]',
						'%y': '\\d\\d',
						'%Y': '\\d\\d\\d\\d',
						'%%': '%',
						'%t': '\\s'
					};
					for (var l in c) n = n.replace(l, '(' + l + c[l] + ')');
					var f = [];
					for (a = n.indexOf('%'); a >= 0; a = n.indexOf('%')) f.push(n[a + 1]), (n = n.replace(new RegExp('\\%' + n[a + 1], 'g'), ''));
					var d = new RegExp('^' + n, 'i').exec(S(e));
					if (d) {
						var m,
							p = (function () {
								function e(e, t, r) {
									return 'number' != typeof e || isNaN(e) ? t : e >= t ? (e <= r ? e : r) : t;
								}
								return {
									year: e(B[(r + 20) >> 2] + 1900, 1970, 9999),
									month: e(B[(r + 16) >> 2], 0, 11),
									day: e(B[(r + 12) >> 2], 1, 31),
									hour: e(B[(r + 8) >> 2], 0, 23),
									min: e(B[(r + 4) >> 2], 0, 59),
									sec: e(B[r >> 2], 0, 59)
								};
							})(),
							h = function (e) {
								var t = f.indexOf(e);
								if (t >= 0) return d[t + 1];
							};
						if (((m = h('S')) && (p.sec = vr(m)), (m = h('M')) && (p.min = vr(m)), (m = h('H')))) p.hour = vr(m);
						else if ((m = h('I'))) {
							var v = vr(m);
							(m = h('p')) && (v += 'P' === m.toUpperCase()[0] ? 12 : 0), (p.hour = v);
						}
						if ((m = h('Y'))) p.year = vr(m);
						else if ((m = h('y'))) {
							var g = vr(m);
							(m = h('C')) ? (g += 100 * vr(m)) : (g += g < 69 ? 2e3 : 1900), (p.year = g);
						}
						if (
							((m = h('m'))
								? (p.month = vr(m) - 1)
								: (m = h('b')) &&
								  (p.month = { JAN: 0, FEB: 1, MAR: 2, APR: 3, MAY: 4, JUN: 5, JUL: 6, AUG: 7, SEP: 8, OCT: 9, NOV: 10, DEC: 11 }[m.substring(0, 3).toUpperCase()] || 0),
							(m = h('d')))
						)
							p.day = vr(m);
						else if ((m = h('j')))
							for (var w = vr(m), y = Cr(p.year), b = 0; b < 12; ++b) {
								var _ = xr(y ? Sr : Tr, b - 1);
								w <= _ + (y ? Sr : Tr)[b] && (p.day = w - _);
							}
						else if ((m = h('a'))) {
							var E = m.substring(0, 3).toUpperCase();
							if ((m = h('U'))) {
								var k = { SUN: 0, MON: 1, TUE: 2, WED: 3, THU: 4, FRI: 5, SAT: 6 }[E],
									F = vr(m);
								(x = 0 === (C = new Date(p.year, 0, 1)).getDay() ? Dr(C, k + 7 * (F - 1)) : Dr(C, 7 - C.getDay() + k + 7 * (F - 1))), (p.day = x.getDate()), (p.month = x.getMonth());
							} else if ((m = h('W'))) {
								var C, x;
								(k = { MON: 0, TUE: 1, WED: 2, THU: 3, FRI: 4, SAT: 5, SUN: 6 }[E]),
									(F = vr(m)),
									(x = 1 === (C = new Date(p.year, 0, 1)).getDay() ? Dr(C, k + 7 * (F - 1)) : Dr(C, 7 - C.getDay() + 1 + k + 7 * (F - 1))),
									(p.day = x.getDate()),
									(p.month = x.getMonth());
							}
						}
						var T = new Date(p.year, p.month, p.day, p.hour, p.min, p.sec, 0);
						return (
							(B[r >> 2] = T.getSeconds()),
							(B[(r + 4) >> 2] = T.getMinutes()),
							(B[(r + 8) >> 2] = T.getHours()),
							(B[(r + 12) >> 2] = T.getDate()),
							(B[(r + 16) >> 2] = T.getMonth()),
							(B[(r + 20) >> 2] = T.getFullYear() - 1900),
							(B[(r + 24) >> 2] = T.getDay()),
							(B[(r + 28) >> 2] = xr(Cr(T.getFullYear()) ? Sr : Tr, T.getMonth() - 1) + T.getDate() - 1),
							(B[(r + 32) >> 2] = 0),
							e + Ur(d[0]).length - 1
						);
					}
					return 0;
				},
				qb: function (e) {
					var t = (Date.now() / 1e3) | 0;
					return e && (B[e >> 2] = t), t;
				},
				Cb: function (e) {
					Fr();
					var t = Date.UTC(B[(e + 20) >> 2] + 1900, B[(e + 16) >> 2], B[(e + 12) >> 2], B[(e + 8) >> 2], B[(e + 4) >> 2], B[e >> 2], 0),
						r = new Date(t);
					B[(e + 24) >> 2] = r.getUTCDay();
					var n = Date.UTC(r.getUTCFullYear(), 0, 1, 0, 0, 0, 0),
						o = ((r.getTime() - n) / 864e5) | 0;
					return (B[(e + 28) >> 2] = o), (r.getTime() / 1e3) | 0;
				}
			};
			!(function () {
				var t = { a: Or };
				function n(t, r) {
					var n,
						o = t.exports;
					(e.asm = o), Q((w = e.asm.Xc).buffer), (j = e.asm.bd), (n = e.asm.Yc), J.unshift(n), ne();
				}
				function o(e) {
					n(e.instance);
				}
				function a(e) {
					return (
						v || 'function' != typeof fetch
							? Promise.resolve().then(function () {
									return fe(le);
							  })
							: fetch(le, { credentials: 'same-origin' })
									.then(function (e) {
										if (!e.ok) throw "failed to load wasm binary file at '" + le + "'";
										return e.arrayBuffer();
									})
									.catch(function () {
										return fe(le);
									})
					)
						.then(function (e) {
							return WebAssembly.instantiate(e, t);
						})
						.then(e, function (e) {
							f('failed to asynchronously prepare wasm: ' + e), oe(e);
						});
				}
				if ((re(), e.instantiateWasm))
					try {
						return e.instantiateWasm(t, n);
					} catch (i) {
						return f('Module.instantiateWasm callback failed with error: ' + i), !1;
					}
				(v || 'function' != typeof WebAssembly.instantiateStreaming || ae(le) || 'function' != typeof fetch
					? a(o)
					: fetch(le, { credentials: 'same-origin' }).then(function (e) {
							return WebAssembly.instantiateStreaming(e, t).then(o, function (e) {
								return f('wasm streaming compile failed: ' + e), f('falling back to ArrayBuffer instantiation'), a(o);
							});
					  })
				).catch(r);
			})(),
				(e.___wasm_call_ctors = function () {
					return (e.___wasm_call_ctors = e.asm.Yc).apply(null, arguments);
				});
			var Nr = (e.___errno_location = function () {
					return (Nr = e.___errno_location = e.asm.Zc).apply(null, arguments);
				}),
				jr = (e._malloc = function () {
					return (jr = e._malloc = e.asm._c).apply(null, arguments);
				}),
				zr = (e._free = function () {
					return (zr = e._free = e.asm.$c).apply(null, arguments);
				}),
				Wr = (e._memset = function () {
					return (Wr = e._memset = e.asm.ad).apply(null, arguments);
				}),
				Gr = (e.___getTypeName = function () {
					return (Gr = e.___getTypeName = e.asm.cd).apply(null, arguments);
				});
			e.___embind_register_native_and_builtin_types = function () {
				return (e.___embind_register_native_and_builtin_types = e.asm.dd).apply(null, arguments);
			};
			var $r,
				qr = (e.__get_tzname = function () {
					return (qr = e.__get_tzname = e.asm.ed).apply(null, arguments);
				}),
				Xr = (e.__get_daylight = function () {
					return (Xr = e.__get_daylight = e.asm.fd).apply(null, arguments);
				}),
				Yr = (e.__get_timezone = function () {
					return (Yr = e.__get_timezone = e.asm.gd).apply(null, arguments);
				}),
				Hr = (e.stackSave = function () {
					return (Hr = e.stackSave = e.asm.hd).apply(null, arguments);
				}),
				Vr = (e.stackRestore = function () {
					return (Vr = e.stackRestore = e.asm.id).apply(null, arguments);
				}),
				Qr = (e.stackAlloc = function () {
					return (Qr = e.stackAlloc = e.asm.jd).apply(null, arguments);
				}),
				Kr = (e._setThrew = function () {
					return (Kr = e._setThrew = e.asm.kd).apply(null, arguments);
				}),
				Jr = (e._memalign = function () {
					return (Jr = e._memalign = e.asm.ld).apply(null, arguments);
				});
			function Zr(e) {
				(this.name = 'ExitStatus'), (this.message = 'Program terminated with exit(' + e + ')'), (this.status = e);
			}
			function en(r) {
				function n() {
					$r ||
						(($r = !0),
						(e.calledRun = !0),
						E ||
							(e.noFSInit || Me.init.initialized || Me.init(),
							de(J),
							t(e),
							e.onRuntimeInitialized && e.onRuntimeInitialized(),
							(function () {
								if (e.postRun) for ('function' == typeof e.postRun && (e.postRun = [e.postRun]); e.postRun.length; ) (t = e.postRun.shift()), Z.unshift(t);
								var t;
								de(Z);
							})()));
				}
				ee > 0 ||
					((function () {
						if (e.preRun) for ('function' == typeof e.preRun && (e.preRun = [e.preRun]); e.preRun.length; ) (t = e.preRun.shift()), K.unshift(t);
						var t;
						de(K);
					})(),
					ee > 0 ||
						(e.setStatus
							? (e.setStatus('Running...'),
							  setTimeout(function () {
									setTimeout(function () {
										e.setStatus('');
									}, 1),
										n();
							  }, 1))
							: n()));
			}
			if (
				((e.dynCall_ji = function () {
					return (e.dynCall_ji = e.asm.md).apply(null, arguments);
				}),
				(e.dynCall_jjj = function () {
					return (e.dynCall_jjj = e.asm.nd).apply(null, arguments);
				}),
				(e.dynCall_iiiijj = function () {
					return (e.dynCall_iiiijj = e.asm.od).apply(null, arguments);
				}),
				(e.dynCall_viijj = function () {
					return (e.dynCall_viijj = e.asm.pd).apply(null, arguments);
				}),
				(e.dynCall_viiijjjj = function () {
					return (e.dynCall_viiijjjj = e.asm.qd).apply(null, arguments);
				}),
				(e.dynCall_jii = function () {
					return (e.dynCall_jii = e.asm.rd).apply(null, arguments);
				}),
				(e.dynCall_viij = function () {
					return (e.dynCall_viij = e.asm.sd).apply(null, arguments);
				}),
				(e.dynCall_vijjiii = function () {
					return (e.dynCall_vijjiii = e.asm.td).apply(null, arguments);
				}),
				(e.dynCall_viiiji = function () {
					return (e.dynCall_viiiji = e.asm.ud).apply(null, arguments);
				}),
				(e.dynCall_viiijii = function () {
					return (e.dynCall_viiijii = e.asm.vd).apply(null, arguments);
				}),
				(e.dynCall_viijii = function () {
					return (e.dynCall_viijii = e.asm.wd).apply(null, arguments);
				}),
				(e.dynCall_vij = function () {
					return (e.dynCall_vij = e.asm.xd).apply(null, arguments);
				}),
				(e.dynCall_viiiiij = function () {
					return (e.dynCall_viiiiij = e.asm.yd).apply(null, arguments);
				}),
				(e.dynCall_viiijj = function () {
					return (e.dynCall_viiijj = e.asm.zd).apply(null, arguments);
				}),
				(e.dynCall_jiji = function () {
					return (e.dynCall_jiji = e.asm.Ad).apply(null, arguments);
				}),
				(e.dynCall_iiiiij = function () {
					return (e.dynCall_iiiiij = e.asm.Bd).apply(null, arguments);
				}),
				(e.dynCall_iiiiijj = function () {
					return (e.dynCall_iiiiijj = e.asm.Cd).apply(null, arguments);
				}),
				(e.dynCall_iiiiiijj = function () {
					return (e.dynCall_iiiiiijj = e.asm.Dd).apply(null, arguments);
				}),
				(e.addRunDependency = re),
				(e.removeRunDependency = ne),
				(e.FS_createPath = Me.createPath),
				(e.FS_createDataFile = Me.createDataFile),
				(e.FS_createPreloadedFile = Me.createPreloadedFile),
				(e.FS_createLazyFile = Me.createLazyFile),
				(e.FS_createDevice = Me.createDevice),
				(e.FS_unlink = Me.unlink),
				(e.addFunction = function (e, t) {
					return h(e, t);
				}),
				(e.Browser = ir),
				(e.FS = Me),
				(e.GL = dr),
				(te = function e() {
					$r || en(), $r || (te = e);
				}),
				(e.run = en),
				e.preInit)
			)
				for ('function' == typeof e.preInit && (e.preInit = [e.preInit]); e.preInit.length > 0; ) e.preInit.pop()();
			return en(), e.ready;
		});
async function Y({
	clientToken: e,
	canvas: t = H(),
	locateFile: r = '',
	devicePixelRatio: n = (e => (null != (e = window.devicePixelRatio) ? e : 1))(),
	maxFaces: o = 1,
	cameraOrientation: a = 0,
	...i
}) {
	var u;
	'string' == typeof r &&
		(r = (function (e) {
			'' === e || e.endsWith('/') || (e += '/');
			return t => e + t;
		})(r)),
		'object' == typeof r && ((u = r), (r = e => u[e])),
		(r = await (async function (e) {
			if (!(await (async () => WebAssembly.validate(new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11])))()))
				return console.info('The platform does not support SIMD.', 'Using "BanubaSDK.wasm"'), e;
			console.info('The platform supports SIMD.', 'Going to use "BanubaSDK.simd.wasm"');
			const t = e('BanubaSDK.simd.wasm');
			if (!t) return console.warn('"BanubaSDK.simd.wasm" is missing in the "locateFile" option.', 'Using "BanubaSDK.wasm" as a fallback'), e;
			if (!(await fetch(t).then(e => e.ok))) return console.warn(`Unable to fetch "BanubaSDK.simd.wasm" from the "${t}".`, 'Using "BanubaSDK.wasm" as a fallback'), e;
			return t => {
				const [r, n] = t.split('.');
				if ('wasm' !== n) return e(t);
				const o = [r, 'simd', n].join('.');
				return e(o);
			};
		})(r));
	const s = await X({ locateFile: r, canvas: t, ...i });
	try {
		const t = new s.banuba_sdk_manager(1, 1, n, a, !1, e);
		return (
			t.set_max_faces(o),
			(t.FS = s.FS),
			(t.PThread = !!s.PThread),
			(t.canvas = s.canvas),
			(t.FaceSearchingMode = s.face_search_mode),
			((c = s),
			function (e) {
				const t = 3,
					r = [],
					n = Object.getPrototypeOf(e),
					{ draw: o } = n;
				return (
					Object.defineProperty(n, 'push_frame', {
						value(e, n, o) {
							if (r.length === t) return;
							const a = r[r.push(c._malloc(e.length)) - 1];
							return c.HEAP8.set(e, a), this.push_frame_ptr(a, n, o);
						}
					}),
					Object.defineProperty(n, 'draw', {
						value() {
							const e = o.call(this);
							return -1 !== e && c._free(r.shift()), e;
						}
					}),
					e
				);
			})(t),
			(function (e) {
				return function (t) {
					const r = Object.getPrototypeOf(t);
					return (
						Object.defineProperty(r, 'set_duration_recognizer_callback', {
							value(...t) {
								return this.set_duration_recognizer_callback_ptr(e.addFunction(...t, 'vff'));
							}
						}),
						t
					);
				};
			})(s)(t),
			(function (e) {
				return function (t) {
					const r = Object.getPrototypeOf(t);
					return (
						Object.entries(r).forEach(([t, n]) => {
							'function' == typeof n &&
								n !== r.constructor &&
								Object.defineProperty(r, t, {
									value(...t) {
										try {
											return n.call(this, ...t);
										} catch (r) {
											throw ('number' == typeof r && (r = new Error(e.get_exception_message(r))), r);
										}
									}
								});
						}),
						t
					);
				};
			})(s)(t),
			(function (e) {
				e.Browser.requestFullscreen = function () {
					this.setCanvasSize(screen.width, screen.height);
				};
			})(s),
			t.set_effect_volume(0),
			t
		);
	} catch (l) {
		throw ('number' == typeof l && (l = new Error(s.get_exception_message(l))), l);
	}
	var c;
}
function H() {
	const e = document.createElement('canvas');
	return (e.style.maxWidth = '100%'), e;
}
const V = e => ([8, 9].includes(e.keyCode) ? e.stopImmediatePropagation() : null);
'undefined' != typeof window && window.addEventListener('keydown', V, !0), 'undefined' != typeof window && window.addEventListener('keyup', V, !0);
const Q = {},
	K = class extends $ {
		constructor(e) {
			super(),
				(this._state = 'paused'),
				(this._frames = (async function* () {})()),
				(this._push_frame = (() => {
					let e, t;
					return ({ data: r, width: n, height: o }) => {
						(e === n && t === o) || ((e = n), (t = o), this._sdk.set_effect_size(n, o), this._sdk.surface_changed(n, o)), this._sdk.push_frame(r, n, o);
					};
				})()),
				(this._draw = () => {
					-1 !== this._sdk.draw() && this.dispatchEvent(new CustomEvent('framerendered'));
				}),
				(this._process = (() => {
					const e = e => {
							this._push_frame(e), this._draw();
						},
						t = e => {
							this._draw(), this._push_frame(e);
						};
					return r =>
						v(() => {
							try {
								(this._sdk.PThread ? t : e)(r);
							} catch (n) {
								this.clearEffect(), console.warn('The effect was force cleared due to the exception:'), console.error(n);
							}
						});
				})()),
				(this._sdk = e),
				this._sdk.set_duration_recognizer_callback((e, t) => this.dispatchEvent(new CustomEvent('frameprocessed', { detail: { instantDuration: e, averagedDuration: t } })));
		}
		get isPlaying() {
			return 'playing' === this._state;
		}
		static setDefaultOptions(e) {
			Object.assign(Q, e);
		}
		static async create(e) {
			const t = { ...Q, ...e },
				r = await Y(t),
				n = new K(r);
			return (
				'onFPSUpdate' in t &&
					(console.warn('DeprecationWarning: Using `Player.create` with `onFPSUpdate` parameter will soon stop working.', "Use `player.addEventListener('frameprocessed')` instead"),
					n.addEventListener('frameprocessed', ({ detail: e }) => t.onFPSUpdate(1 / e.averagedDuration, 1 / e.instantDuration))),
				'enableMirroring' in t &&
					console.warn('DeprecationWarning: Using `Player.create` with `enableMirroring` parameter will soon stop working.', 'Use `horizontalFlip` option of `player.use()` method instead'),
				n
			);
		}
		use(e, { fps: t = 30, ...r } = {}) {
			this._frames = (async function* (e, t) {
				const r = 1e3 / t,
					n = 0.1;
				let o = Date.now(),
					a = 0;
				for (;;) {
					o = Date.now();
					let t = o - a;
					if (t < r - n) {
						await new Promise(e => v(e));
						continue;
					}
					a = o - (t % r);
					const { value: i, done: u } = await e.next();
					if (u) return i;
					yield i;
				}
			})(e[Symbol.asyncIterator](r), t);
		}
		async applyEffect(e) {
			const t = await e._write(this._sdk.FS);
			this._sdk.load_effect(t);
		}
		clearEffect() {
			this._sdk.unload_effect();
		}
		callJsMethod(e, t = '') {
			this._sdk.call_js_method(e, t);
		}
		setVolume(e) {
			this._sdk.set_effect_volume(e), this.dispatchEvent(new CustomEvent('volumechange', { detail: e }));
		}
		async play() {
			if (('pausing' === this._state && (this._state = 'playing'), 'playing' !== this._state)) {
				for (this._state = 'playing'; 'playing' === this._state; ) {
					const { value: e } = await this._frames.next();
					if (!e) break;
					this.dispatchEvent(new CustomEvent('framereceived')), this._process(e);
				}
				this._state = 'paused';
			}
		}
		pause() {
			'playing' === this._state && (this._state = 'pausing');
		}
	};
let J = K;
(J.FRAME_RECEIVED_EVENT = 'framereceived'), (J.FRAME_PROCESSED_EVENT = 'frameprocessed'), (J.FRAME_RENDERED_EVENT = 'framerendered');
const Z = new WeakMap(),
	ee = {
		render: (e, t) => {
			const r = 'string' == typeof t ? document.querySelector(t) : t;
			if (!(r instanceof HTMLElement)) throw new Error('Target container is not a DOM element');
			Z.set(r, e), r.appendChild(e._sdk.canvas), e.play();
		},
		unmount: e => {
			const t = 'string' == typeof e ? document.querySelector(e) : e;
			if (!(t instanceof HTMLElement)) throw new Error('Target container is not a DOM element');
			const r = Z.get(t);
			r && t.removeChild(r._sdk.canvas), Z.delete(t);
		}
	};
class te {
	constructor(e) {
		this._player = e;
	}
	async takePhoto(e) {
		this._player.isPlaying && (await new Promise(e => this._player.addEventListener('framerendered', e, { once: !0 })));
		const t = re(this._player._sdk.canvas, null == e ? void 0 : e.width, null == e ? void 0 : e.height);
		return await new Promise((r, n) => {
			var o;
			return t.toBlob(e => (e ? r(e) : n(new Error('Unexpected error: Unable to create Blob'))), null != (o = null == e ? void 0 : e.type) ? o : 'image/jpeg', null == e ? void 0 : e.quality);
		});
	}
}
const re = (e, t = e.width, r = e.height) => {
		if (t !== e.width || r !== e.height) {
			const n = ne(t, r);
			return n.getContext('2d').drawImage(e, 0, 0, n.width, n.height), n;
		}
		return e;
	},
	ne = (e, t) => {
		let r;
		return (
			'undefined' == typeof OffscreenCanvas
				? ((r = document.createElement('canvas')), (r.width = e), (r.height = t))
				: ((r = new OffscreenCanvas(e, t)),
				  (r.toBlob = function (e, t, r) {
						this.convertToBlob({ type: t, quality: r })
							.then(e)
							.catch(t => e(null));
				  })),
			r
		);
	},
	oe =
		'undefined' != typeof MediaStream
			? MediaStream
			: class {
					constructor() {
						throw new Error('The environment does not support MediaStream API');
					}
			  },
	ae = class extends oe {
		constructor(e) {
			super();
			const t = ae.cache.get(e);
			return (
				(t && t.active) ||
					(e._sdk.canvas
						.captureStream()
						.getTracks()
						.forEach(e => this.addTrack(e)),
					ae.cache.set(e, this)),
				ae.cache.get(e)
			);
		}
		getVideoTrack(e = 0) {
			return this.getVideoTracks()[e];
		}
		getAudioTrack(e = 0) {
			return this.getAudioTracks()[e];
		}
	};
let ie = ae;
ie.cache = new WeakMap();
const ue =
	'undefined' != typeof MediaRecorder
		? MediaRecorder
		: class {
				constructor() {
					throw new Error('The environment does not support MediaRecorder API');
				}
		  };
class se extends ue {
	constructor(e, t) {
		super(e._sdk.canvas.captureStream(), t);
	}
	async stop() {
		return new Promise((e, t) => {
			const r = t => {
					super.removeEventListener('dataavailable', r), super.removeEventListener('error', n), e(t.data);
				},
				n = e => {
					super.removeEventListener('dataavailable', r), super.removeEventListener('error', n), t(e.error);
				};
			super.addEventListener('dataavailable', r), super.addEventListener('error', n), super.stop();
		});
	}
}
const ce = '0.38.3';
export {
	ee as Dom,
	W as Effect,
	S as Image,
	te as ImageCapture,
	D as MediaStream,
	ie as MediaStreamCapture,
	J as Player,
	ce as VERSION,
	M as Video,
	se as VideoRecorder,
	R as Webcam,
	Q as defaultPlayerOptions,
	L as defaultVideoConstraints,
	P as defaultVideoOptions
};
